XEROF

 

xlsgen 4.5.0.27 : Automatic source code for pivot tables


Build 4.5.0.27 of xlsgen adds automatic source code generation support for pivot tables. In other words, the automatic source code generation tool automatically creates the source code for existing pivot tables from XLS, XLSX and XLSB files, in the programming language of your choice. It makes it much simpler to use in practice : just create the pivot table in Excel, and ask the automatic source code generation tool for it.

Here is an example :


A pivot table in Excel

And here is the corresponding source code for it (VB) :

Dim pivotTable002s0 As IXlsPivotTable
Set pivotTable002s0 = wksht002.NewPivotTable
pivotTable002s0.DataSource.Range = "Sheet2!B2:F7"
pivotTable002s0.Options.Layout = enumPivotTableLayout.pivottablelayout_tabular
pivotTable002s0.Options.BuiltInPivotTableStyle = enumPivotTableStyle.pivottablestyle_light16
pivotTable002s0.Options.ShowRowHeaders = True
pivotTable002s0.Options.ShowColumnHeaders = True
pivotTable002s0.Options.ShowRowStripes = False
pivotTable002s0.Options.ShowColumnStripes = False
pivotTable002s0.Options.ShowGrandTotalsForRows = True
pivotTable002s0.Options.ShowGrandTotalsForColumns = True
Dim pf002s0r1 As IXlsPivotTableField
Set pf002s0r1 = pivotTable002s0.Rows.AddByName("s0")
pf002s0r1.AggregateFunction = enumPivotAggregateFunction.aggrpivotfunction_none
pf002s0r1.UnselectItemByName("aƩ")
Dim pf002s0r2 As IXlsPivotTableField
Set pf002s0r2 = pivotTable002s0.Rows.AddByName("s1")
Dim pf002s0d1 As IXlsPivotTableField
Set pf002s0d1 = pivotTable002s0.Data.AddByName("s2")
pivotTable002s0.InsertAt(13, 4)

It covers many of the pivot table features, i.e. data source, style, pivot fields (page/row/col/data), pivot field details (sorting, filtering, show values as, number format, ...)

Posted on 12-July-2018 09:16 | Category: xlsgen, Excel generator | comment[0] | trackback[0]

 

 

<-- previous page

< July >
0102030405
0607080910
1112131415
1617181920
2122232425
2627282930
31



 

 

This site
Home
Articles

DevTools
CPU-Z
EditPlus
ExplorerXP
Kill.exe
OllyDbg
DependencyWalker
Process Explorer
autoruns.exe
Araxis
COM Trace injection
CodeStats
NetBrute
FileMon/Regmon
BoundsChecker
AQTime profiler
Source monitor
GDI leaks tracking
Rootkit revealer
Rootkit removal
RunAsLimitedUser(1)
RunAsLimitedUser(2)

 

 

Liens
Le Plan B
Un jour à Paris
Meneame
Rezo.net (aggr)
Reseau voltaire
Cuba solidarity project
Le grand soir
L'autre journal
Le courrier suisse
L'Orient, le jour
Agoravox (aggr)