Skip to content

add button to export issues to Excel #35313

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tpokorra
Copy link

@tpokorra tpokorra commented Aug 19, 2025

This PR adds a button to the issues list, and when you click on it, the currently displayed issues will be downloaded as an Excel file.

fixes #29906

Screenshot after adding the button "Export to Excel":

grafik

@GiteaBot
Copy link
Collaborator

@tpokorra I noticed you've updated the locales for non-English languages. These will be overwritten during the sync from our translation tool Crowdin. If you'd like to contribute your translations, please visit https://crowdin.com/project/gitea. Please revert the changes done on these files. 🍵

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 19, 2025
@github-actions github-actions bot added modifies/translation modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files modifies/dependencies labels Aug 19, 2025
@tpokorra tpokorra force-pushed the TP-20250818-export_issues_to_excel branch from a46cb8f to d38901f Compare August 19, 2025 14:51
@tpokorra tpokorra force-pushed the TP-20250818-export_issues_to_excel branch from d38901f to 1d87056 Compare August 19, 2025 14:57
@tpokorra tpokorra changed the title add button to export issues to Excel; related to #29906 add button to export issues to Excel Aug 19, 2025
@silverwind
Copy link
Member

silverwind commented Aug 19, 2025

The button is far too prominent and there should only ever be one primary button on a page indicating the most likely action the user will take.

I recommend making a right-aligned "..." button on the right side of "Sort" and putting it in there. Check repo frontpage on how to implement this "..." menu using tippy.js.

headers := []string{"ID", "Title", "Status", "Assignee(s)", "Label(s)", "Created At"}
for col, h := range headers {
cell, _ := excelize.CoordinatesToCellName(col+1, 1)
f.SetCellValue(sheet, cell, h)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ref: https://xuri.me/excelize/en/stream.html

Streaming write should be used here, as ordinary write will occupy a lot of memory when the data volume is slightly larger.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Aug 21, 2025
@hiifong hiifong self-requested a review August 21, 2025 01:17
@GiteaBot GiteaBot added lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Aug 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/dependencies modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files modifies/translation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Print/Export List of Issues
4 participants