Win a copy of Terraform in Action this week in the Cloud 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

Created Excel file is missing something

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:


 
Marshal
Posts: 26914
82
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!

 
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