xml opened in excel - condit.formatting and formatnumber setting

neallbeck

New Member
i use following xml file and open it in Excel 2007:\[code\]<?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"xmlns:html="http://www.w3.org/TR/REC-html40"><DocumentProperties xmlns="urn:schemas-microsoft-com:office:office"> </DocumentProperties><Styles> <Style ss:ID="style1"> <NumberFormat ss:Format="###,##0.00"/> </Style> </Styles><Worksheet ss:Name="QWERTZ"> <Table> <Row> <Cell ss:StyleID="style1"><Data ss:Type="Number">1.30</Data></Cell> <Cell ss:StyleID="style1"><Data ss:Type="Number">1.70</Data></Cell> <Cell ss:StyleID="style1"><Data ss:Type="Number">1.90</Data></Cell> </Row> <Row> <Cell ss:StyleID="style1"><Data ss:Type="Number">1.30</Data></Cell> <Cell ss:StyleID="style1"><Data ss:Type="Number">1.70</Data></Cell> <Cell ss:StyleID="style1"><Data ss:Type="Number">1.90</Data></Cell> </Row> </Table> <ConditionalFormatting xmlns="urn:schemas-microsoft-com:office:excel"> <Range>R1C1:R1C3</Range> <Condition> <Qualifier>Greater</Qualifier> <Value1>1.80001</Value1> <Format Style='background:red'/> </Condition> <Condition> <Qualifier>Between</Qualifier> <Value1>1.40001</Value1> <Value2>1.80</Value2> <Format Style='background:#C2D69A'/> </Condition> <Condition> <Qualifier>LessOrEqual</Qualifier> <Value1>1.40</Value1> <Format Style='background:#009900'/> </Condition> </ConditionalFormatting></Worksheet></Workbook>\[/code\]As you can see, i have \[code\]condit.formatting\[/code\] on first row.The second row is identical, but without \[code\]cond.formatting\[/code\].The numberformat on first row is corrupted.I defined two trailing zeros, but they are cut off.I need to have number format as \[code\]"###,##0.00"\[/code\] everywhere.It looks like appliing condit.formatting spoils the defined numberformat.(i don't want \[code\]"1.3", "1.7"\[/code\] etc, but \[code\]"1.30", "1.70"\[/code\]... on the first row) What do i do incorrectly?Many thanks for any help!
 
Back
Top