• Post Reply Bookmark Topic Watch Topic
  • New Topic

XML spreadsheet not opening correctly in java version 1.5  RSS feed

 
Pooja Jatwani
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

We are migrating a application from weblogic 8.1 to weblogic 9.2.
As weblogic 9.2 is complaint with java version 5 the application has been complied in version 5 but the spreadsheet is not opening correctly.It is showing somewhat like thus:

ÿþ<?xml version="1.0"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet">
<Styles>
<Style ss:ID="Default" ss:Name="Normal">
<Alignment ss:Vertical="Bottom"/>
<Borders/>
<Font/>
<Interior/>
<NumberFormat/>
<Protection/>
</Style>
<Style ss:ID="s21">
<NumberFormat ss:Format="General Date"/>
</Style>
<Style ss:ID="s22">
<NumberFormat ss:Format="Short Time"/>
</Style>
</Styles>
<Worksheet ss:Name="SLAMReport">
<Table ss:ExpandedColumnCount="25" ss:ExpandedRowCount="2" x:FullColumns="1"
x:FullRows="1">
<Row>
<Cell><Data ss:Type="String">WorkOrder</Data></Cell>
<Cell><Data ss:Type="String">WOType</Data></Cell>
<Cell><Data ss:Type="String">Branch</Data></Cell>
<Cell><Data ss:Type="String">EntryDate</Data></Cell>
<Cell><Data ss:Type="String">PAT</Data></Cell>
<Cell><Data ss:Type="String">PATColor</Data></Cell>
<Cell><Data ss:Type="String">PFT</Data></Cell>
<Cell><Data ss:Type="String">PFTColor</Data></Cell>
<Cell><Data ss:Type="String">SiteTime</Data></Cell>
<Cell><Data ss:Type="String">ETA</Data></Cell>
<Cell><Data ss:Type="String">ETC</Data></Cell>
<Cell><Data ss:Type="String">CoverageCode</Data></Cell>
<Cell><Data ss:Type="String">WOStatus</Data></Cell>
<Cell><Data ss:Type="String">PriorityCode</Data></Cell>
<Cell><Data ss:Type="String">WOAge</Data></Cell>
<Cell><Data ss:Type="String">PrimaryCSR</Data></Cell>
<Cell><Data ss:Type="String">SiteName</Data></Cell>
<Cell><Data ss:Type="String">City</Data></Cell>
<Cell><Data ss:Type="String">CustomerName</Data></Cell>
<Cell><Data ss:Type="String">Territory</Data></Cell>
<Cell><Data ss:Type="String">StopCode</Data></Cell>
<Cell><Data ss:Type="String">CountryCode</Data></Cell>
<Cell><Data ss:Type="String">PostalCode</Data></Cell>
<Cell><Data ss:Type="String">CustomerNumber</Data></Cell>
<Cell><Data ss:Type="String">SiteNumber</Data></Cell>
</Row>
<Row>
<Cell><Data ss:Type="String">W106275005</Data></Cell>
<Cell><Data ss:Type="String">2</Data></Cell>
<Cell><Data ss:Type="String">RU101</Data></Cell>
<Cell><Data ss:Type="String">2011-06-27 12:51</Data></Cell>
<Cell><Data ss:Type="String">2011-06-27 20:51</Data></Cell>
<Cell><Data ss:Type="String">red</Data></Cell>
<Cell><Data ss:Type="String">2011-06-28 10:51</Data></Cell>
<Cell><Data ss:Type="String"></Data></Cell>
<Cell><Data ss:Type="String">19:36</Data></Cell>
<Cell><Data ss:Type="String"></Data></Cell>
<Cell><Data ss:Type="String"></Data></Cell>
<Cell><Data ss:Type="String"></Data></Cell>
<Cell><Data ss:Type="String">OP</Data></Cell>
<Cell><Data ss:Type="String">00</Data></Cell>
<Cell><Data ss:Type="String">7254:45</Data></Cell>
<Cell><Data ss:Type="String">'</Data></Cell>
<Cell><Data ss:Type="String"> " !!! ! !%/!"+</Data></Cell>
<Cell><Data ss:Type="String">!</Data></Cell>
<Cell><Data ss:Type="String"> " !!! ! !%/!"+</Data></Cell>
<Cell><Data ss:Type="String">RU101M</Data></Cell>
<Cell><Data ss:Type="String">'</Data></Cell>
<Cell><Data ss:Type="String">RU</Data></Cell>
<Cell><Data ss:Type="String">'101000</Data></Cell>
<Cell><Data ss:Type="String">110499</Data></Cell>
<Cell><Data ss:Type="String">5912912</Data></Cell>
</Row>
</Table>
<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
<Selected/>
<ProtectObjects>False</ProtectObjects>
<ProtectScenarios>False</ProtectScenarios>
</WorksheetOptions>
</Worksheet>
</Workbook>


Whareas in java cversion 4 it was showing as

WorkOrder WOType Branch EntryDate PAT PATColor PFT PFTColor SiteTime ETA ETC CoverageCode WOStatus PriorityCode WOAge PrimaryCSR Serial No SiteName City

All these are column headings which are shown incorrectly when java version is changed.

Has anybody faced the similar kind of issue?

Thanks




 
Anayonkar Shivalkar
Bartender
Posts: 1558
5
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Pooja Jatwani,

There is a dedicated forum for Weblogic, where you can get better and quicker help. You can request forum admin to move this thread to appropriate forum (instead of creating a new thread).

And welcome to CodeRanch!
 
Tim Moores
Saloon Keeper
Posts: 4034
94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you trying to open it, and what are you using to display it?
 
Pooja Jatwani
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is an icon to download the xml spreadsheet.When wee click on the icon the pop-up apperas to opn or save the spreadsheet.
Its an application built in servlets and jsp.



 
Tim Moores
Saloon Keeper
Posts: 4034
94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most likely this is caused by the different version of WebLogic, not the different version of Java. Note, by the way, that Java 5 is way, way obsolete, and that you should migrate away from it ASAP.

Are the correct content type, content encoding and content disposition HTTP headers being sent for the file?
 
Pooja Jatwani
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Below is what mentioned in content type and header

aRes.setContentType("application/vnd.ms-excel;charset=UTF-8");
aRes.setHeader("Content-Disposition","attachment;filename=Report.xls");

I have also tried the below one but still no change :


aRes.setContentType("application/csv;charset=UTF-8");
aRes.setHeader("Content-Disposition","inline; filename=SLAMReport.csv");aRes.setHeader("Content-Disposition","attachment;filename=SLAMReport.xls");
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!