mirror of
https://github.com/jmcnamara/libxlsxwriter.git
synced 2026-05-15 14:15:54 -06:00
[GH-ISSUE #1] optimize file does not get closed #1
Labels
No labels
awaiting user feedback
bug
cmake
cmake
docs
feature request
in progress
long term
medium term
medium term
pull-request
question
question
ready to close
short term
under investigation
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/libxlsxwriter#1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @LaurinStrelow on GitHub (Feb 18, 2015).
Original GitHub issue: https://github.com/jmcnamara/libxlsxwriter/issues/1
Originally assigned to: @jmcnamara on GitHub.
Hi,
i think i found a bug. When using the the constant memory mode, the worksheet creates temporary files, as i can see this that files never get closed. After creating a large amount of worksheets (on iOS about 300), the system does not create new tempfiles and returns null instead, because there are too many (temp) files open.
@jmcnamara commented on GitHub (Feb 18, 2015):
Hi,
The temp files aren't closed while the calling program is running since they may still be required for writing.
The Python version of the module has an undocumented facility to allow the user to close and if necessary re-open the temp files. This was to workaround a similar open file limit on Windows.
I'll look at adding something similar to libxlsxwriter.
John
@LaurinStrelow commented on GitHub (Feb 18, 2015):
This sounds as a good solution. However at the moment the optimize files never get closed, even if the workbook gets closed or the worksheet freed and the file is not needed anymore.
@jmcnamara commented on GitHub (Feb 19, 2015):
Yes. There is that issue as well. I'll fix it in the next few days.
Is that the issue that you are having or are you also trying to generate a workbook with > 300 worksheets?
John
@LaurinStrelow commented on GitHub (Feb 19, 2015):
Yes this was the issue i have. I make two workbooks with about 200 worksheets and the second workbook won't complete. But i think it is better to have the possibility to close the file and won't get near the file limit anytime later, if more worksheets are needed.
@jmcnamara commented on GitHub (Feb 23, 2015):
Test case:
@jmcnamara commented on GitHub (Feb 23, 2015):
Hi,
I've pushed a fix to master for the tmpfile issue in
constant_memory mode. You can try it when you get a chance.You should open a second, feature request, issue for the extension to open/close the tempfiles during the life of the workbook, if you need that feature.
P.S. For iOS did you have to use downgrade the version of the zlib libraries as shown here?
John
@LaurinStrelow commented on GitHub (Feb 24, 2015):
Hi,
thank you! This solves my issue. I will open another issue for the feature request.
I did not had to downgrade the zlib. The app has already mailcore installed via cocoapods, their binary includes minizip. Therefore i did not need to install minizip or take care of zlib. They are using the preinstalled library. However i needed to replace the
zipOpenNewFileInZip4_64withzipOpenNewFileInZip2to get the linking done. This is sadly the only possibility i have.