RichText missing in 'exceljs' - NodeJS

拈花ヽ惹草 提交于 2019-12-11 15:38:13

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!