Posted 5 March 2024, 2:16 am EST
Hi
I use to export the Excel IO lib “gc.spread.excelio” (version 16.x)
var instance = new GC.Spread.Excel.IO();
var value = instance.save(json, successCallBack, errorCallBack, options);
when opening the file using excel I have some errors on pivot table cache. (I join the sjs file)
- Enregistrements réparés: Rapport de tableau croisé dynamique dans la partie /xl/pivotCache/pivotCacheDefinition1.xml (Cache de tableau croisé dynamique)
I have no issue using the designer, that seems to use other things in “gc.spread.sheets.io” [workbook.save(filetype=0=excel ], with some function that seems to do the job like _savePivotCache
Is it recommended to use sheets.io features directly, instead of excel.io?
pivot is created with this code
let range = "=Datos!$A:$D";
let pivotTable = activeSheet.pivotTables.add("PivotTable1", range, 0, 0, GC.Spread.Pivot.PivotTableLayoutType.tabular, GC.Spread.Pivot.PivotTableThemes.light3);
// pivotTable.suspendLayout();
pivotTable.add("Abreviatura", "Abreviatura", GC.Spread.Pivot.PivotTableFieldType.rowField);
pivotTable.add("Nombre", "Nombre", GC.Spread.Pivot.PivotTableFieldType.rowField);
pivotTable.add("Es Web", "Es Web", GC.Spread.Pivot.PivotTableFieldType.columnField);
pivotTable.add("Orden", "Suma de Orden", GC.Spread.Pivot.PivotTableFieldType.valueField, GC.Pivot.SubtotalType.sum);
// pivotTable.resumeLayout();
// activeSheet.resumePaint();
thank in advance