[GH-ISSUE #354] Working with spreadsheets without filesystem interaction #282

Closed
opened 2026-05-05 12:05:51 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @ivan770 on GitHub (Aug 27, 2021).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/354

Originally assigned to: @jmcnamara on GitHub.

Hi! While using a Rust wrapper of libxlsxwriter I found that it's impossible to obtain finalized xlsx bytes without writing them to filesystem. Is this a problem with a Rust wrapper, or C version of a library doesn't support this feature?

Originally created by @ivan770 on GitHub (Aug 27, 2021). Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/354 Originally assigned to: @jmcnamara on GitHub. Hi! While using a Rust wrapper of `libxlsxwriter` I found that it's impossible to obtain finalized `xlsx` bytes without writing them to filesystem. Is this a problem with a Rust wrapper, or C version of a library doesn't support this feature?
gitea-mirror 2026-05-05 12:05:51 -06:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@jmcnamara commented on GitHub (Aug 27, 2021):

It is mainly a limitation of what can be done in ANSI C (which I'm constrained to support for Windows compatibility). Even outside that limitation it isn't easy in C to replace disk filehandles (which libxlsxwriter uses a lot) with in memory filehandles. It can be done, to a certain extent, with fmemopen() but requires a fixed size buffer which wouldn't be very convenient.

By way of comparison the Python version of this library (xlsxwriter) has transparent support for fully in memory creation of files.

So unfortunately this probably isn't fixable.

<!-- gh-comment-id:907235615 --> @jmcnamara commented on GitHub (Aug 27, 2021): It is mainly a limitation of what can be done in ANSI C (which I'm constrained to support for Windows compatibility). Even outside that limitation it isn't easy in C to replace disk filehandles (which libxlsxwriter uses a lot) with in memory filehandles. It can be done, to a certain extent, with fmemopen() but requires a fixed size buffer which wouldn't be very convenient. By way of comparison the Python version of this library (xlsxwriter) has transparent support for fully in memory creation of files. So unfortunately this probably isn't fixable.
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#282
No description provided.