Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 240895 - Export to Excel. Problem with number's patterns
Summary: Export to Excel. Problem with number's patterns
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 2.3.0   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: 2.3.1   Edit
Assignee: JingwenShen CLA
QA Contact:
URL:
Whiteboard: Autoed,G-text
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-15 11:41 EDT by Pavel Severov CLA
Modified: 2010-03-25 02:56 EDT (History)
6 users (show)

See Also:


Attachments
Examples (.rptdesign and .xls). BIRT 2.2 vs BIRT 2.3 (3.10 KB, application/octet-stream)
2008-07-15 11:41 EDT, Pavel Severov CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Severov CLA 2008-07-15 11:41:23 EDT
Created attachment 107481 [details]
Examples (.rptdesign and .xls). BIRT 2.2 vs BIRT 2.3

Build ID: I20080617-2000

Steps To Reproduce:
1. Add data field with type=float to any report
2. Set it to constant value = 1234.56789
3. Set pattern = #0.0 (one digit after decimal point)
4. Run the report (you should see 1234.6)
5. Make export to Excel (you should see 1234.5678, WHICH IS NOT MATCHED TO PATTERN)

More information:
This bug appears only in BIRT v.2.3.0
BIRT v.2.2 produces Excel output correctly.

The reason for this "feature" is following - output XLS file contains:
  <NumberFormat ss:Format="#0.0"/> (for BIRT v.2.2 - correct)
  <NumberFormat ss:Format="#0.0###"/> (for BIRT v.2.3 - INCORRECT)

This superfluous ### produces superfluous digits on the Excel sheet.
Comment 1 Pavel Severov CLA 2008-07-16 16:48:30 EDT
[solution, at least for me]: 
It is necessary to delete this magic "###" everywhere(?) in
org.eclipse.birt.report.engine.emitter.prototype.excel\src\org\eclipse\birt\report\engine\emitter\excel\ExcelWriter.java

--
 Pavel Severov
Comment 2 JingwenShen CLA 2008-07-22 01:16:04 EDT
fix the problem in birt V2.3.1
Comment 3 Xiaodan Wang CLA 2008-07-23 03:10:47 EDT
Verified in build (2.3.1.v20080723-0938).