Hi,
I have this error Type Error: Cannot read property 'rId' of null when 脿 try to use an Excel file that contains charts. If I remove charts no error.
Is it possible to fix this?
Thanks for your response.
also getting this error, no charts though.
Uncaught (in promise) TypeError: Cannot read property 'rId' of null
two-cell-anchor-xform.js:109
at module.exports.reconcile /exceljs/dist/es5/xlsx/xform/drawing/two-cell-anchor-xform.js:111:41
code causing it..
var workbook = new Excel.Workbook();
workbook.xlsx.readFile(form_path)
.then(function() {
var worksheet = workbook.getWorksheet(1);
var row = worksheet.getRow(5);
row.getCell(1).value = 5; // A5's value set to 5
row.commit();
return workbook.xlsx.writeFile('new.xlsx');
})
confirmed that form_path is returning correct path to .xlsx file.
UPDATE:
found the code cauing it. it also causes it for images.
Changed (/exceljs/dist/es5/xlsx/xform/drawing/two-cell-anchor-xform.js:)
Line 111 and 112 into:
if(model.picture != null){
var rel = options.rels[model.picture.rId];
var match = rel.Target.match(/.*\/media\/(.+[.][a-z]{3,4})/);
}
Is this patched to some release?
Also getting this error after adding a chart to a worksheet.
This was fixed in 0.6.0 (dfd12e80f24d922a20007243619e2f4850dcaa13)
Most helpful comment
also getting this error, no charts though.
code causing it..
confirmed that
form_pathis returning correct path to .xlsx file.UPDATE:
found the code cauing it. it also causes it for images.
Changed (/exceljs/dist/es5/xlsx/xform/drawing/two-cell-anchor-xform.js:)
Line 111 and 112 into: