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

Using Excel with Java

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone, I am working on learning to use excel with java and I have ran into a stumbling block. It seems I can not insert a column using Apache API and thus can not update the excel sheet. I believe I have came up with a work around when I write and run a VBA script that I will call from the java program that will insert all the columns I need and them update it from there. Do you guys think this would be a good solution or do you guys have a better work around you came up with?
 
Saloon Keeper
Posts: 6223
58
Eclipse IDE Firefox Browser MySQL Database VI Editor Java Windows
 
Sheriff
Posts: 24654
58
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see why you can't insert a column. It may be that the API doesn't have an "Insert Column" method to do it in one line of code, but that shouldn't stop you from doing it the hard way, I don't think.
 
Ardel Grider
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Carry The problem I am having is not with my code but with the API its self due to its limitations based on the information i have found.

@Paul From what I have seen on a few Stack Overflow posts you can not Insert a Column. So I am trying to come up with the best work around. What is this hard way you are referring to? Have you used the Apache API before?

Here are some examples of results I have found with my research.
http://stackoverflow.com/questions/4199096/apache-poi-how-to-insert-column-in-excel-file
http://stackoverflow.com/questions/28394100/adding-column-to-excel-using-apache-poi
http://apache-poi.1045710.n5.nabble.com/Adding-Deleting-a-Column-td2309908.html
 
Too many men are afraid of being fools - Henry Ford. Foolish tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!