Comments (7)
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
from libxlsxwriter.
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.
from libxlsxwriter.
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.
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
from libxlsxwriter.
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.
from libxlsxwriter.
Test case:
#include "xlsxwriter.h"
int main() {
int i;
lxw_workbook *workbook;
lxw_worksheet *worksheet;
lxw_workbook_options options = {.constant_memory = 1};
for (i = 0; i <= 5000; i++) {
printf("File = %d\n", i);
workbook = new_workbook_opt("test.xlsx", &options);
worksheet = workbook_add_worksheet(workbook, NULL);
worksheet_write_string(worksheet, 0, 0, "Hello", NULL);
worksheet_write_number(worksheet, 1, 0, 123, NULL);
workbook_close(workbook);
}
return 0;
}
from libxlsxwriter.
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
from libxlsxwriter.
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_64
with zipOpenNewFileInZip2
to get the linking done. This is sadly the only possibility i have.
from libxlsxwriter.
Related Issues (20)
- Feature Request: Add zig package HOT 1
- Broken logic in FindMINIZIP.cmake HOT 3
- Is there any way to update format without value, or update value without format? HOT 1
- Potential regression 1.1.4 -> 1.1.5: Test fails on big-endian architecture (Debian s390x) HOT 3
- errors when I compile HOT 1
- cmake errors HOT 3
- undefined reference to symbol 'deflate' , when I cross compile HOT 4
- New feature: Add signature file for VBA projects HOT 1
- Unit tests won't run when using Microsoft C compiler HOT 6
- Ability to insert a link with href HOT 2
- How do I insert a picture as embedded in a cell ? HOT 16
- OSSFuzz integration HOT 6
- Maintenance suggestion: update vendored copy of minizip library
- libxlsxwrite can only write data to tables, but not read data from tables? HOT 2
- Using this lib in for another computer language HOT 2
- Implement the $book->set_custom_color() function from the Perl library in the C library HOT 2
- Linker error when trying to use latest version with macOS project HOT 1
- File creation performance HOT 2
- Linux(CentOS6) Build Error.
- LXW_ERROR_CREATING_XLSX_FILE: error creating output xlsx file. Usually a permissions error. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libxlsxwriter.