Skip to content
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

Reports.php: Downloaded XLS file doesn't have the correct file suffix #695

Open
PerplexedTheta opened this issue Jan 24, 2022 · 3 comments
Labels
bug This is a bug (not an enhancement) Next release Propose for February release

Comments

@PerplexedTheta
Copy link

Hi all,

First of all, this is my first submission to this community's issue tracker. I have attempted to adhere to generic bug submission conventions, however, if there is a problem with the place or methodology I have used in submitting this bug, please do let me know.

On to business: we have been experiencing an issue on our Coral ERM sites around the reports module. Namely, when you attempt to export a report as an XLS file, the download delivers a file that would appear to be rubbish data. Upon further inspection, I've found Excel capable of opening the file simply by adding the 'XSL' file extension.

Steps to reproduce:

  1. Navigate to /reports
  2. Select a report which contains some data
  3. On the results page, select the Excel icon
  4. The file is downloaded successfully, but without the file extension

I have appended a patch to this ticket, which, I'm sure you'll agree, is a simplistic fix to the issue. If further work is desired, or necessary, to get this patch into the product, please do let me know, and I will gladly assist!

coral-report-xls-export-hotfix.patch.txt

@andyp-uk
Copy link
Contributor

Please could you create a pull request with the code changes and link it to this issue? The pull request should merge changes into the development branch.

@PerplexedTheta
Copy link
Author

Hi Andy,

Thanks for the comment. I have created a pull request (new territory for me), which can be viewed here.

Please let me know if I can assist further

@streatim streatim added bug This is a bug (not an enhancement) Next release Propose for February release labels Nov 12, 2024
@streatim
Copy link
Collaborator

Per a conversation in PR #697, @gmcharlt wrote

Better long term options might be to provide a CSV export option and/or a library to generate true XLS or XSLX output.

I'm putting this note here to indicate what the future release recommendation would be; likely a .csv export rather than XLS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This is a bug (not an enhancement) Next release Propose for February release
Projects
None yet
Development

No branches or pull requests

3 participants