Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Update pivot table source with Apache POI 3.14

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good morning guys.

I have a problem with apache POI 3.14. I've two workbooks, one with new data and one with old data and a pivot table. My code copies the new data sheet in the workbook with the pivot table, but i don't know how to update the pivot table values.
I'm getting mad with the documentation, i cant figure out how to solve this. Could you please help me?  
 
Saloon Keeper
Posts: 7174
166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Disclaimer: I know POI well, but nothing about its handling of pivot tables.

My first question would be: why use such an old version of POI? Since 3.14, at least 3 changes/enhancements have been made to pivot table handling according to https://poi.apache.org/changes.html, described as "Pivot table enhancements", "Support Table (structured reference) sources in PivotTables" and "XSSFPivotTable::addColumnLabel sets the cell type of a cell outside of the source data area", respectively. While it's not clear that those apply to your situation, it might be worth the effort to try the latest released version.
 
Francesco Mancini
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Tim, thank you for helping!

Actually, i cant change the POI version, i'm working on an old application and i just can't upgrade the POI version.

If you have any other ideas, would be appreciated!
 
Tim Moores
Saloon Keeper
Posts: 7174
166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you mean by "I can't upgrade" - POI has excellent backward compatibility, upgrading should not cause any issues.
 
Francesco Mancini
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can't because i'm working on a project and i don't have the permissions to change the libraries.
 
Tim Moores
Saloon Keeper
Posts: 7174
166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Too bad, but these things happen. It would still be an interesting experiment to upgrade for yourself and see if the problem is easier to tackle (which would make a good point for upgrading).

Can you post the relevant code that shows what you're doing, and describe what's still missing?
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic