codeant-ai-for-open-source[bot] commented on PR #38513:
URL: https://github.com/apache/superset/pull/38513#issuecomment-4030188030
## **Sequence Diagram**
This PR fixes CSV and Excel downloads for legacy chart types by having the
frontend build relative explore_json URLs for exports and adding XLSX handling
and permission checks on the backend.
```mermaid
sequenceDiagram
participant User
participant Frontend
participant Backend
User->>Frontend: Request CSV or Excel download for legacy chart
Frontend->>Frontend: Detect legacy chart and desired format
Frontend->>Backend: POST explore_json with form_data and csv/xlsx flag
using relative URL
Backend->>Backend: Determine response type and validate export permission
alt CSV export
Backend->>Backend: Generate CSV from query data
Backend-->>User: CSV file download
else XLSX export
Backend->>Backend: Generate Excel from query dataframe (handle empty)
Backend-->>User: Excel file download
end
```
---
*Generated by [CodeAnt AI](https://codeant.ai)*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]