• 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

xlxs extention does not support

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Please help me...
I am using office 2007 and with xlxs format
The list which is being displyed on page ..I am trying to save it In Excel wih POI.
Servlet code is saving the data in excel to the destination in xlxs format
but In jsp when i try to open it directly in excel sheet after clicking on open button. It is giving message,

Excel cannot open the file DistributionCalendarDownload.xlxs because the file format and file extention is not valid.
Varify that the file has not been currupted and that the file extention matches the format of the File.
 
Rancher
Posts: 43027
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So... did you verify that the file is not corrupted? Did you make sure that the extension matches the file type?
 
Bhupendra Dubey
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes file is not currupted and extention is valid
but excel is opening with .xls format but not in .xlsx format
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
response.setHeader("Content-disposition", "attachment;filename=ABC.xlsx");

when i am changing .xlxs in jsp in setContent Type it is giving the below message


Excel cannot open the file ABC.xlsx because the file format and file extention is not valid.
Varify that the file has not been currupted and that the file extention matches the format of the File
 
Ulf Dittmer
Rancher
Posts: 43027
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How have you verified that the file is not corrupt? Also, you can't handle binary data in JSPs; you'll need to use a servlet instead.
 
Bhupendra Dubey
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But If I open it from the destination path which i gave in servlet, It is open and show the data.
 
Ulf Dittmer
Rancher
Posts: 43027
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What you need to verify is that the data that gets stream from the web app is byte-for-byte identical to the file that you originally put on the server. Unless that's the case, all other speculation is pointless.
 
Bhupendra Dubey
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Still not solving the problem
 
Ulf Dittmer
Rancher
Posts: 43027
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does that mean you have by now verified that what you stream from your servlet to the browser (and, as I said, you must use a servlet, you can't use a JSP) is a byte-for-byte identical copy of the original file? How did you do that?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic