[GH-ISSUE #139] Is libxlsxwriter endian-safe? #113

Closed
opened 2026-05-05 11:42:08 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @cesss on GitHub (Nov 30, 2017).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/139

Originally assigned to: @jmcnamara on GitHub.

Traditional Excel files depend on endianness, but maybe XLSX files don't (I don't know).

Can you confirm if libxlsxwriter should generate fine XLSX files both in big endian and little endian machines? (If affirmative, let me suggest adding this comment as a feature in the feature list)

Originally created by @cesss on GitHub (Nov 30, 2017). Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/139 Originally assigned to: @jmcnamara on GitHub. Traditional Excel files depend on endianness, but maybe XLSX files don't (I don't know). Can you confirm if libxlsxwriter should generate fine XLSX files both in big endian and little endian machines? (If affirmative, let me suggest adding this comment as a feature in the feature list)
gitea-mirror 2026-05-05 11:42:08 -06:00
Author
Owner

@jmcnamara commented on GitHub (Nov 30, 2017):

Traditional Excel files depend on endianness, but maybe XLSX files don't (I don't know).

Correct. Xlsx files are XML files in a zip container so they aren't subject to endianess.

Can you confirm if libxlsxwriter should generate fine XLSX files both in big endian and little endian machines?

I assume it should work on big endian systems but I can't confirm since I don't currently have access to a big-endian system (I used to have a Sun workstation). If you do you could run the test suite and confirm.

<!-- gh-comment-id:348200503 --> @jmcnamara commented on GitHub (Nov 30, 2017): > Traditional Excel files depend on endianness, but maybe XLSX files don't (I don't know). Correct. Xlsx files are XML files in a zip container so they aren't subject to endianess. > Can you confirm if libxlsxwriter should generate fine XLSX files both in big endian and little endian machines? I assume it should work on big endian systems but I can't confirm since I don't currently have access to a big-endian system (I used to have a Sun workstation). If you do you could [run the test suite](https://libxlsxwriter.github.io/running_the_tests.html) and confirm.
Author
Owner

@cesss commented on GitHub (Nov 30, 2017):

Yes, I do have access to an iMac G5. However, I cannot promise a date for the tests, as my access to that machine is not frequent.

<!-- gh-comment-id:348203031 --> @cesss commented on GitHub (Nov 30, 2017): Yes, I do have access to an iMac G5. However, I cannot promise a date for the tests, as my access to that machine is not frequent.
Author
Owner

@jmcnamara commented on GitHub (Nov 30, 2017):

I do have access to an iMac G5.

Actually, I forgot that I have a G5 MacMini in my attic. If I get a chance I'll dig it out for testing.

<!-- gh-comment-id:348203999 --> @jmcnamara commented on GitHub (Nov 30, 2017): > I do have access to an iMac G5. Actually, I forgot that I have a G5 MacMini in my attic. If I get a chance I'll dig it out for testing.
Author
Owner

@jmcnamara commented on GitHub (Feb 11, 2018):

I finally got around to booting up my old G5 Mac Mini to test this.

It was OS X 10.5.8 system and I hadn't used it since January 2011 according to the file times. It was still fairly usable though.

Anyway I compiled libxlsxwriter fine and the output file worked with Excel 2008 for Mac. After a bit of work I got a version of pytest to work with the system Python 2.5.1 and the test suite all passed except for one test with inserting a BMP image. I fixed that.

For the record you need to compile it as follows:

make USE_BIG_ENDIAN=1

I've added this to the docs. Thanks for the prompt to try it.

<!-- gh-comment-id:364798009 --> @jmcnamara commented on GitHub (Feb 11, 2018): I finally got around to booting up my old G5 Mac Mini to test this. It was OS X 10.5.8 system and I hadn't used it since January 2011 according to the file times. It was still fairly usable though. Anyway I compiled libxlsxwriter fine and the output file worked with Excel 2008 for Mac. After a bit of work I got a version of pytest to work with the system Python 2.5.1 and the test suite all passed except for one test with inserting a BMP image. I fixed that. For the record you need to compile it as follows: make USE_BIG_ENDIAN=1 I've added this to the docs. Thanks for the prompt to try it.
Author
Owner

@jmcnamara commented on GitHub (Feb 11, 2018):

Added in version 0.7.6. Closing.

<!-- gh-comment-id:364802390 --> @jmcnamara commented on GitHub (Feb 11, 2018): Added in version 0.7.6. Closing.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/libxlsxwriter#113
No description provided.