GitHub user dosubot[bot] added a comment to the discussion: When the user 
selects Export to Excel from the download menu on page 3(or any other page) the 
system exports page 1 instead.

<!-- Answer -->
This is a known limitation in Superset. The "Export to Excel" option always 
exports the first page of data, regardless of which page you're viewing, 
because the export logic does not include the current pagination state in the 
export request. Pagination is handled entirely on the client side, so the 
backend only knows to return the first page or the full dataset, depending on 
the export type. As a result, "Export to Excel" exports the first page, and 
"Export to full Excel" exports the entire dataset if the ALLOW_FULL_CSV_EXPORT 
feature flag is enabled. This behavior is confirmed in both the code and 
community discussions 
([source](https://github.com/apache/superset/issues/35141#issuecomment-3292977292),
 [source](https://github.com/apache/superset/discussions/31467)).

To change this so that only the current page is exported, the frontend would 
need to send the current page index (pagination state) to the backend as part 
of the export request. This is not implemented yet, but there are ongoing 
discussions and some development efforts to add an "Export Current View" 
feature that would export only the visible rows, either by exporting the data 
directly from the frontend or by extending the backend API to support this 
([source](https://github.com/apache/superset/issues/35141#issuecomment-3292977292)).

If you need to export all data, use "Export to full Excel" with the feature 
flag enabled. If you want to export only the current page, there is no built-in 
workaround at this time. For more details and updates, see the related [issue 
thread](https://github.com/apache/superset/issues/35141#issuecomment-3292977292)
 and [discussion](https://github.com/apache/superset/discussions/31467).


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*

---
<sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/86599ca2-b608-48e4-a24e-043c6e11102e?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/86599ca2-b608-48e4-a24e-043c6e11102e?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/86599ca2-b608-48e4-a24e-043c6e11102e?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/86599ca2-b608-48e4-a24e-043c6e11102e?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/86599ca2-b608-48e4-a24e-043c6e11102e?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/86599ca2-b608-48e4-a24e-043c6e11102e?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/86599ca2-b608-48e4-a24e-043c6e11102e?feedback_type=other)</sup>

[![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20is%20a%20known%20limitation%20in%20Superset.%20The%20%22Export%20to%20Excel%22%20option%20always%20exports%20the%20first%20page%20of%20data%2C%20regardless%20of%20which%20page%20you%27re%20viewing%2C%20because%20the%20export%20logic%20does%20not%20include%20the%20current%20pagination%20state%20in%20the%20export%20request.%20Pagination%20is%20handled%20entirely%20on%20the%20client%20side%2C%20so%20the%20backend%20only%20knows%20to%20return%20the%20first%20page%20or%20the%20full%20dataset%2C%20depending%20on%20the%20export%20type.%20As%20a%20result%2C%20%22Export%20to%20Excel%22%20exports%20the%20first%20page%2C%20and%20%22Export%20to%20full%20Excel%22%20exports%20the%20entire%20dataset%20if%20the%20ALLOW_FULL_CSV_EXPORT%20feature%20flag%20is%20e
 
nabled.%20This%20behavior%20is%20confirmed%20in%20both%20the%20code%20and%20community%20discussions%20%28%5Bsource%5D%28https%3A//github.com/apache/superset/issues/35141%23issuecomment-3292977292%29%2C%20%5Bsource%5D%28https%3A//github.com/apache/superset/discussions/31467%29%29.%0A%0ATo%20change%20this%20so%20that%20only%20the%20current%20page%20is%20exported%2C%20the%20frontend%20would%20need%20to%20send%20the%20current%20page%20index%20%28pagination%20state%29%20to%20the%20backend%20as%20part%20of%20the%20export%20request.%20This%20is%20not%20implemented%20yet%2C%20but%20there%20are%20ongoing%20discussions%20and%20some%20development%20efforts%20to%20add%20an%20%22Export%20Current%20View%22%20feature%20that%20would%20export%20only%20the%20visible%20rows%2C%20either%20by%20exporting%20the%20data%20directly%20from%20the%20frontend%20or%20by%20extending%20the%20backend%20API%20to%20support%20this%20%28%5Bsource%5D%28https%3A//github.com/apache/superset/issues/35141%23issuecomment-329
 
2977292%29%29.%0A%0AIf%20you%20need%20to%20export%20all%20data%2C%20use%20%22Export%20to%20full%20Excel%22%20with%20the%20feature%20flag%20enabled.%20If%20you%20want%20to%20export%20only%20the%20current%20page%2C%20there%20is%20no%20built-in%20workaround%20at%20this%20time.%20For%20more%20details%20and%20updates%2C%20see%20the%20related%20%5Bissue%20thread%5D%28https%3A//github.com/apache/superset/issues/35141%23issuecomment-3292977292%29%20and%20%5Bdiscussion%5D%28https%3A//github.com/apache/superset/discussions/31467%29.)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/36748)

GitHub link: 
https://github.com/apache/superset/discussions/36748#discussioncomment-15292607

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to