graph TD
A[Start - Receive CSV Data] --> B[Input Processing]
B --> C[CSV Data Validation]
C --> D{Is Data Valid?}
D -->|No| E[Error Handling]
E --> B
D -->|Yes| F[Add Branding]
F --> G[Format Data]
G --> H{File Type Selection}
H -->|CSV| I[Generate CSV with Branding]
H -->|XLSX| J[Convert to Base64 XLSX]
I --> K[Prepare Download]
J --> K
K --> L[Final Output File]
L --> M[End]
subgraph Silo1
B
C
D
E
F
G
H
I
J
K
end