问题
I am new in NodeJS development.
I am trying to read an excel sheet and save the same excel into another file. My Excel sheet contains a RichText (Hello World) - Please see input excel file.
And after save into new file, missing the entire cell value - Please see the output. Also see the below code I used to generate the excel file.
input excel file:
const xlsx = require('exceljs')
var filename = 'File1.xlsx'
var workbook = new xlsx.Workbook();
workbook.xlsx.readFile(filename).then(function(work_bk){
var worksheet = workbook.getWorksheet(1);
var str_val = worksheet.getCell('A3').text
console.log(str_val)
return workbook.xlsx.writeFile('new.xlsx');
});
Output:
来源:https://stackoverflow.com/questions/58135659/richtext-missing-in-exceljs-nodejs