Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 240895

Summary: Export to Excel. Problem with number's patterns
Product: z_Archived Reporter: Pavel Severov <severov>
Component: BIRTAssignee: JingwenShen <jingwen.shen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: bluesoldier, hustlg, severov, wyan, xwang, zqian
Version: 2.3.0   
Target Milestone: 2.3.1   
Hardware: PC   
OS: Windows XP   
Whiteboard: Autoed,G-text
Attachments:
Description Flags
Examples (.rptdesign and .xls). BIRT 2.2 vs BIRT 2.3 none

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).