rabanti-github/NanoXLSX

Is it possible to create a pivot table?

thiagossrs opened this issue · 5 comments

Is it possible to create a pivot table?

I did not found a way to do it.

This is not yet implemented. I must have a look into the code of an existing workbook with a pivot table. If it is just an extension of a common worksheet, then it is probably easy to implement.
But I have to admit that I haven't worked with Pivots for years.

Thank you for your response. I'll try to workaround it. If i found a easy solution, I'll share with you.

I looked into an example table. In principle, reasonable to implement (at least more reasonable than the full style stack).
However, some changes would be necessary:

  • Some additional (xml) documents are to be defined
  • Functions to add pivot tables or to set filters and fields are to be define
  • Pivot table options are to be defined

Difficult to implement in the short-term...
I have planned to release a more modular major version where such an extension could easily be implemented. This would also be a merge of PicoXLSX and NanoXLSX (Nano would be an extension package of the core Pico package). But I had to postpone this plan, and don't know when I find the time to rewrite the whole library.

Ok, thank you very much for the insight.

I will close this issue for now.
Since I am working on a v2.x of the library that hopefully can be extended more easily than v1.x, a plugin for pivot, diagrams and intra-cell formatting may be much more feasible.
I cannot say, when this v2 is finished, since I spend much more time in consideration of a good™ architecture, extensibility and unit testing, than previously.
Please let me know, if you see another important use case that should be covered.