Posted 15 May 2022, 9:28 pm EST
Hi,
We are sorry but getCSV data only return the inside value, not the formatted text. You may create your own function to get all the text with format from a particular range. Please refer to the following code snippet and attached sample that explains the same.
function getALLText(sheet, range) {
if (!(range instanceof GC.Spread.Sheets.CellRange)) return null;
let data = [],
rowData = [];
for (let row = range.row; row < range.row + range.rowCount; row++) {
rowData = [];
for (let col = range.col; col < range.col + range.colCount; col++) {
rowData.push(sheet.getText(row, col));
}
data.push(rowData);
}
return data;
}
sample: https://codesandbox.io/s/spread-js-starter-forked-nwjcvh?file=/src/index.js:573-997
regards,
Avinash