How can PivotTables be created using SpreadsheetLight?

I have found the creation of PivotTables using Excel Interop to be possible, but just barely.

I'm experimenting with SpreadsheetLight now, hoping that it might be easier, not just for the basics of .xlsx generation, but fancier things such as the creation of PivotTables, too.

The core obect, SLDocument, has one property, method, or event that contains the word "PivotTable" namely:

sl.RefreshPivotTableOnLoad

There is no "AddPivotTable()", "CreatePivotTable()", etc.

Is there a way to create a PivotTable using SpreadsheetLight and, if so, how is it accomplished?

UPDATE

SLStyle also has a PivotButton boolean property.

UPDATE 2

I have recently been introduced to EPP, and am switching to it; SpreadsheetLight is in many ways preferable to straight Excel Interop, and EPP seems to be preferable to SpreadsheetLight.

Sometimes it seems almost by accident that I light upon a preferable tool; it is rather capricious or even a matter of "luck" whether one discovers the codex after struggling with the scrolls, not knowing there's a better way.

Maybe there should be a sort of "Consumer Reports" for developers that would include articles comparing spreadsheet-generating software, code comparison tools, [ software tool 3 ], [ software tool 4 ], ... [ software tool N ]; surely there would be no end of different types of tools and suites and packages to compare and that would be a great help to the many developers flailing and thrashing about for the best, or at least a better, tool than the one they are currently employing.

Upvotes: 2

Views: 1067

Answers (1)

HyperBuzz
HyperBuzz

Reputation: 36

there is an extension on

https://github.com/AmbaCloud/Amba.SpreadsheetLight

install with nuget and then you can create pivots with sl.CreatePivoTable()...

Greetings Hyper

Upvotes: 2

Related Questions