• 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
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Created Excel file is missing something

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Java geniuses,

I'm using Apache POI to work with excel files. I'm trying to read an excel file (xlsx) and copy it to a new file (also xlsx) with a few rows and extra information added. This new file is then loaded into another web app in development by other people. The new file that is created is not being loaded by the web app, and it seems like the new file is missing something. For one thing, the file size is 8 kb, whereas the file size of the starting file is 53 kb, so I'm guessing when I'm writing the new file, I'm not adding some sort of information that is normally present in excel files. Any ideas?

Here's the code:


 
Sheriff
Posts: 24654
58
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First step: see if you can open the output of that code in Excel. Then use the eyeball check to see if it contains the right information, comparing it to the spreadsheet you used as the input.
 
Matthew Busse
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Thanks for your response. It turns out the file is fine. My mistake was assuming the other application took a .xlsx file, when it actually only takes .xls.

Thanks anyway!

 
This looks like a job for .... legal tender! It says so right in this 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!