Open karan-jaryal opened 6 years ago
@karan-jaryal Thanks for the bug report and the code example! Are you using the latest version of the excel4node library? I am unable to reproduce this issue, but I am testing with Excel 2016 on both Mac and Windows. I don't have access to test with version 10 as Microsoft no longer supports that version
Yes I am using the latest version.I have tested it on excel 2016 its not working there.It ask’s for excel repair
I am too faced same issue with Office 2010. Excel is asking for repair, after repair there is a xml log:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
<logFileName>error015800_01.xml</logFileName><summary>Errors detected in file "C:\Users\user\Downloads\ExcelFile
(2).xlsx"</summary><repairedRecords summary="Here is the fixes made:"><repairedRecord>Restored parts: Sheet properties
from /xl/workbook.xml (Book)</repairedRecord></repairedRecords></recoveryLog>
What sheet properties could lead to that errors? I've noticied that it's happens when I clicked several times on download link. 1st time no errors, after all broken. It seems that wb object is not destroyng automatically on sever side. Is there any wb.destroy command?
I think I fixed that by doing something like:
let xl = require('excel4node');
let filename="test.xlsx"
let wb = new xl.Workbook();
let ws=wb.addWorksheet('test');
ws.cell(5, 3).string(mytest);
ws.cell(6, 3).string('Outside of print area, not included in printing');
res
.set('content-disposition', `attachment; filename="${filename}"; filename*=UTF-8''${encodeURI(filename)}`) // filename header
.type('.xlsx') // setting content-type to xlsx. based on file extention
wb.write(filename, res);
wb=null;
ws=null;
I have problem,I am unable to open the validated excel in MS excel 10.Got opened in Libre Office. Code: // Create a new instance of a Workbook class const wb = new xl.Workbook();