Posted 6 September 2022, 8:17 am EST
Actually we are setting the pagebreak through code in spreadJS in angular application using the code below.
spread.getactiveSheet().setColumnPageBreak(2, true);
spread.getactiveSheet().setRowPageBreak(3, true);
and then export the spread through method exportFile() using the below piece of code
[b] private exportFile(spread: GC.Spread.Sheets.Workbook): void {
//var json = JSON.stringify(spread.toJSON());
var cache = ;
var json = JSON.stringify(spread.toJSON({ includeBindingSource: true }), function (key, value) {
if (typeof value === ‘object’ && value !== null) {
if (cache.indexOf(value) !== -1) {
// Circular reference found, discard key
return;
}
// Store value in our collection
cache.push(value);
}
return value;
});
cache = null; //
var excelIO = new GC.Spread.Excel.IO();
excelIO.save(json, function (blob) {
saveAs(blob, 'export.xlsx');
}, function (e) {
alert(e);
});
}[/b]
when we open the exported excel file, row/column pagebreak is not working.
Please use the above code to reproduce the issue.