Is there a way to get the formatted numerical value from a worksheet cell in ExcelJS? In the Excel workbook the cell formula results in value is 5.726027397260274, has a number format of “#,###.0” , and displays as “5.7”.
But in Excel JS, workbook.getWorksheet("slide1").getCell('Q4').text
returns “5.726027397260274”. Does ExcelJS have a way to resolve number formats to retrieve formatted values?
{
text: "5.726027397260274",
_value: {
"model": {
"address": "Q4",
"value": 5.726027397260274,
"type": 2,
"style": {
"numFmt": "#,##0.0",
"font": {
"size": 11,
"color": {
"theme": 1
},
"name": "Calibri",
"family": 2,
"scheme": "minor"
},
"border": {
"left": {
"style": "thin",
"color": {
"indexed": 64
}
},
"right": {
"style": "thin",
"color": {
"indexed": 64
}
},
"top": {
"style": "thin",
"color": {
"indexed": 64
}
},
"bottom": {
"style": "thin",
"color": {
"indexed": 64
}
}
},
"fill": {
"type": "pattern",
"pattern": "solid",
"fgColor": {
"argb": "FFFFFF00"
},
"bgColor": {
"indexed": 64
}
},
"alignment": {
"horizontal": "center"
}
}
}
}
}