Empty sheets after using writeFile
See original GitHub issueHi,
I’m using the XLSX module to open a XLSX file with empty sheets and fill them.
This is an extract of our code :
var myXlsx = XLSX.readFile( filePath );
myXlsx.Sheets[ 'existingSheet' ][ 'F3' ] = {"v":"TEST","t":"s","r":"<t>TEST</t>","h":"TEST"};
XLSX.writeFile(
myXlsx,
filePath
);
If i execute the same code with an existing XLSX with non empty sheets it works. But when i try to modify an empty cell it does not work!
Thanks in advance for your time
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
writeFile returns empty file in SheetJs - Stack Overflow
The function receives a valid worksheet object(I inspected), the worksheet name display well but no information is in the file.
Read more >Response.writefile() method writes empty page in asp.net
C#. // Try This : byte[] fileBytes = File.ReadAllBytes(fi.FullName); Response.Clear() Response.ContentType == "application/pdf" Response.
Read more >WriteFile function (fileapi.h) - Win32 apps - Microsoft Learn
Writes data to the specified file or input/output (I/O) device.
Read more >writeFile - Cypress Documentation
Using null explicitly will allows you to write a Buffer directly, ... {projectRoot}/path/to/data.json will be created with the following contents:.
Read more >Using the writeFileSync method in Node.js - LogRocket Blog
Catching errors while using writeFileSync in Node.js ... As such, you should use the asynchronous function writeFile for creating and ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@andrewdsilva you can actually change the
!ref
field to include the full range! see https://github.com/SheetJS/js-xlsx/issues/82 for a similar issue.@sheetjsdev It would be nice to have a helper function that takes a range and a cell and produces a new range that includes the cell.
We’re thinking of adding something like this to the utilities:
For now it is in the wiki: https://github.com/SheetJS/js-xlsx/wiki/General-Utility-Functions#adding-a-cell-to-a-range