Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in Export to Excel using Jexcel api

 
Padmalatha Kontham
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Iam implementing Export to Excel functionality using Jexcel api in my dynpage coding.

Say I have given excel sheet name as MySampleExcel.xls in the coding.

1. I click on Export to Excel button - > open, an excel sheet is opened with the values exported to it from the backend.
2. If you see the excel sheet name in the top left corner, it is displaying as MySampleExcel(1). Next time, when you open , it is displaying MySampleExcel[2]. If you try to do "Save As" under File menu, it is saving with the numbers at the end of filename which is something like:

MySampleExcel[2]
MySampleExcel[3]
MySampleExcel(1)

It is randomly generating these numbers.

What could be the problem? Please suggest.

Regards,
Padmalatha.K
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My guess would be that the browser sees that a file called MySampleExcel.xls already exists, so it gives it a new, distinctive name in order to avoid overwriting the existing one.
 
Padmalatha Kontham
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

We tried to clear the cache but no luck.
Could you please suggest some other options?

Regards,
Padmalatha.K
 
Padmalatha Kontham
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

The issue is happening with the IE Browser. we have no issue when we click on " export excel " > " save".

we find the issue ( observation ) only when we click on " export excel " > "open".

filename(n).xls gets opened.

can we make it as filename.xls?.

Please Suggest.

Thanks in Advance.

Regards,
Padmalatha.K
 
Eugene Abarquez
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic