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

File is missing media type #1889

Closed
barlevd opened this issue Apr 30, 2024 · 2 comments · Fixed by #1890
Closed

File is missing media type #1889

barlevd opened this issue Apr 30, 2024 · 2 comments · Fixed by #1890
Labels
confirmed This issue can be reproduced

Comments

@barlevd
Copy link
Contributor

barlevd commented Apr 30, 2024

File are missing Excel media properties

Steps to reproduce the issue:

  1. Create a new file, or update and exiting one
  2. Export the data and save to your local computer
  3. In linux / Mac OS, with the file tool file --mime-type file.xlsx, it reports file.xlsx: application/octet-stream

Describe the results you received:

Describe the results you expected:

file --mime-type file.xlsx
file.xlsx: application/octet-stream

The output should be

file.xlsx: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Output of go version:

go version go1.22.1 darwin/amd64

Excelize version or commit ID:

(paste here)

Environment details (OS, Microsoft Excel™ version, physical, etc.):

The fix is to change the sort order of the output zip file.

@xuri xuri added the confirmed This issue can be reproduced label Apr 30, 2024
xuri added a commit to barlevd/excelize that referenced this issue Apr 30, 2024
Saving workbook with reverse sorted internal part path to keep same hash of identical files
xuri pushed a commit that referenced this issue Apr 30, 2024
Saving workbook with reverse sorted internal part path to keep same hash of identical files and fix incorrect MIME type
@xuri
Copy link
Member

xuri commented Apr 30, 2024

Thanks for issue. I have merged the pull request. Please upgrade to the master branch code, and this patch will be released in the next version.

@barlevd
Copy link
Contributor Author

barlevd commented Apr 30, 2024

Thank you for the fast follow up.

barlevd added a commit to barlevd/excelize that referenced this issue Apr 30, 2024
@xuri xuri moved this to Improve the Compatibility in Excelize v2.9.0 Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed This issue can be reproduced
Projects
No open projects
Status: Improve the Compatibility
2 participants