Comments (3)
The library uses sys_get_temp_dir() and tempnam() to write temporary files, and then later assemble them into an .xlsx file. Perhaps one of these functions was disabled via in your hosting provider's php.ini:
http://php.net/manual/en/ini.core.php#ini.disable-functions
<?php
echo sys_get_temp_dir()."\n";
echo tempnam(sys_get_temp_dir(), "xlsx_writer_");
from php_xlsxwriter.
Bingo!
Done it at my (Windows) pc: C:\Windows\TEMP C:\Windows\Temp\xls124F.tmp
and at my hosted (Linux) site: /tmp
The temporary file isn't created. In fact the temp_dir shouldn't be "/tmp", but /public//tmp". I hardcoded that in line 45: $filename = tempnam("/public/tmp", "xlsx_writer_");
and now it works!
Thanks a lot, you saved my day!
Regards,
Gosse
from php_xlsxwriter.
What also works for me is changing line 45 to:
$filename = tempnam(ini_get('session.save_path'), "xlsx_writer_");
from php_xlsxwriter.
Related Issues (20)
- IS this just a writer or can we append? HOT 1
- GitHub About (quick win) HOT 1
- Not Work Xampp PHP v8.1.6 HOT 3
- How to add cell data starting with space or more space (not trimmed) HOT 1
- How to set cell width HOT 2
- Macro HOT 1
- Date format issue in Excel 2021 HOT 1
- Writing excel with title/caption in first two rows then header and then rows HOT 3
- Trouble on styling cells HOT 1
- auto_filter doesn't work when there are rows before table header HOT 1
- Question: Requirements on Docker HOT 1
- вакансия пхп
- how do i set different font color in one cell
- Is it intentional that the default number format formatCode is "GENERAL" instead of "General" HOT 1
- Error when opening file generated with this library in a newer version of excel. HOT 1
- TimeFormat in Excel 365 with only time as input HOT 1
- Set cell width only for some cells HOT 2
- PHP 8.2 deprecation warning, passing NULL to htmlspecialchars HOT 2
- Is this streaming the info from memory to disk?
- excel cannot open the file because the file format or file extension is not valid HOT 3
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 php_xlsxwriter.