[GH-ISSUE #76] constant memory mode problem #64

Closed
opened 2026-05-05 11:35:29 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @xakepsoft on GitHub (Nov 4, 2016).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/76

Originally assigned to: @jmcnamara on GitHub.

xlsx file created using {.constant_memory = LXW_TRUE , .tmpdir = NULL}
cannot be read by akeneo-labs xlsx php reader.

File created with 'options' contains xl/sharedStrings.xml however file without 'options' doesn't have that.

Is there a way to prevent creation of xl/sharedStrings.xml ???
I would like to disable it for a while until akeneo-labs guys fix their issue with shared strings.

LibreOffice reads both files ok.

Originally created by @xakepsoft on GitHub (Nov 4, 2016). Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/76 Originally assigned to: @jmcnamara on GitHub. xlsx file created using {.constant_memory = LXW_TRUE , .tmpdir = NULL} cannot be read by akeneo-labs xlsx php reader. File created with 'options' contains xl/sharedStrings.xml however file without 'options' doesn't have that. Is there a way to prevent creation of xl/sharedStrings.xml ??? I would like to disable it for a while until akeneo-labs guys fix their issue with shared strings. LibreOffice reads both files ok.
gitea-mirror 2026-05-05 11:35:29 -06:00
Author
Owner

@jmcnamara commented on GitHub (Nov 4, 2016):

File created with 'options' contains xl/sharedStrings.xml however file without 'options' doesn't have that.

Just to be clear, I think that should be the other way around.

Basically it works like this:

  1. In default libxlsxwriter new() mode the constant_memory mode is off and the library writes any strings to the xl/sharedStrings.xml file. This can be considered a "standard" xlsx file.
  2. When constant_memory in on the libxlsxwriter library avoids a non constant memory overhead by writing the strings "inline" in the worksheet.xml files and avoid using the xl/sharedStrings.xml file. This is a documented Excel feature that is supported by most spreadsheet applications. However, some applications don't support it, such as Apple Numbers.

If spreadsheet-parser doesn't support it then you should avoid using the constant_memory option in libxlsxwriter.

I hope that clears things up.

John

<!-- gh-comment-id:258418661 --> @jmcnamara commented on GitHub (Nov 4, 2016): > File created with 'options' contains xl/sharedStrings.xml however file without 'options' doesn't have that. Just to be clear, I think that should be the other way around. Basically it works like this: 1. In default libxlsxwriter `new()` mode the `constant_memory` mode is off and the library writes any strings to the `xl/sharedStrings.xml` file. This can be considered a "standard" xlsx file. 2. When `constant_memory` in on the libxlsxwriter library avoids a non constant memory overhead by writing the strings "inline" in the `worksheet.xml` files and avoid using the `xl/sharedStrings.xml` file. This is a documented Excel feature that is supported by most spreadsheet applications. However, some applications don't support it, such as Apple Numbers. If spreadsheet-parser doesn't support it then you should avoid using the `constant_memory` option in libxlsxwriter. I hope that clears things up. John
Author
Owner

@jmcnamara commented on GitHub (Nov 4, 2016):

P.S., This side-effect is documented: http://libxlsxwriter.github.io/working_with_memory.html#ww_mem_inline_strings

<!-- gh-comment-id:258419515 --> @jmcnamara commented on GitHub (Nov 4, 2016): P.S., This side-effect is documented: http://libxlsxwriter.github.io/working_with_memory.html#ww_mem_inline_strings
Author
Owner

@xakepsoft commented on GitHub (Nov 4, 2016):

Thanx, a lot.

I'll try to fix the reader so it conforms to standards.

<!-- gh-comment-id:258421987 --> @xakepsoft commented on GitHub (Nov 4, 2016): Thanx, a lot. I'll try to fix the reader so it conforms to standards.
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#64
No description provided.