This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Update pivot table source with Apache POI 3.14

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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: 5809
146
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • 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
  • 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: 5809
146
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • 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
  • 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: 5809
146
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • 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?
 
Doody calls. I would really rather that it didn't. Comfort me wise and sterile 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
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!