Posted 12 October 2021, 8:57 am EST
Hi,
I create a pivot table with this code:
Sheet2.tables.addFromDataSource('Table1',0,0,data,GC.Spread.Sheets.Tables.TableThemes.light10);
pivotTable = sheet1.pivotTables.add("PivotTable", "Table1", 0, 0, GC.Spread.Pivot.PivotTableLayoutType.outline, GC.Spread.Pivot.PivotTableThemes.medium1);
pivotTable.suspendLayout();
pivotTable.add('department', 'Department', GC.Spread.Pivot.PivotTableFieldType.rowField);
pivotTable.add('agency', 'Agency', GC.Spread.Pivot.PivotTableFieldType.rowField);
pivotTable.add('prices', 'Prices', GC.Spread.Pivot.PivotTableFieldType.valueField,GC.Pivot.SubtotalType.sum);
pivotTable.add('distance', 'Distance', GC.Spread.Pivot.PivotTableFieldType.valueField,GC.Pivot.SubtotalType.sum);
pivotTable.resumeLayout();
pivotTable.autoFitColumn();
I want to format my “Prices” colunm with “### ### €”, but I don’t find the way to add a style on a specific valuefield column by programming. Is there a solution?