以文本方式查看主题 - 中文XML论坛 - 专业的XML技术讨论区 (http://bbs.xml.org.cn/index.asp) -- 『 WORD to XML, HTML to XML 』 (http://bbs.xml.org.cn/list.asp?boardid=13) ---- 求助各位大虾把xml转化为xls格式 (http://bbs.xml.org.cn/dispbbs.asp?boardid=13&rootid=&id=42163) |
-- 作者:jlspwws -- 发布时间:1/10/2007 12:05:00 PM -- 求助各位大虾把xml转化为xls格式 小弟用的是python,用java也可以,请问各位大虾,有没有什么方法可以把xml格式的文件转化为xls格式的,需要保留原有的格式,因为我的xml文件中有画了和excel一样的表格,所以想一起保留 xml结构是 <?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"> <LastAuthor>jiangchuan</LastAuthor> <LastPrinted>2002-10-24T08:12:48Z</LastPrinted> <Created>1997-09-05T06:47:56Z</Created> <LastSaved>2002-12-05T12:11:43Z</LastSaved> <Company>NEC</Company> <Version>11.5606</Version> </DocumentProperties> <OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office"> <Colors> <Color> <Index>39</Index> <RGB>#E3E3E3</RGB> </Color> </Colors> </OfficeDocumentSettings> <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel"> <WindowHeight>9045</WindowHeight> <WindowWidth>12120</WindowWidth> <WindowTopX>0</WindowTopX> <WindowTopY>1470</WindowTopY> <TabRatio>727</TabRatio> <ProtectStructure>False</ProtectStructure> <ProtectWindows>False</ProtectWindows> </ExcelWorkbook> <Styles> <Style ss:ID="Default" ss:Name="Normal"> <Alignment ss:Vertical="Bottom"/> <Borders/> <Font ss:FontName="MS Pゴシック" x:CharSet="128" x:Family="Modern" ss:Size="11"/> <Interior/> <NumberFormat/> <Protection/> </Style> <Style ss:ID="s21"> <Alignment ss:Horizontal="CenterAcrossSelection" ss:Vertical="Center"/> <Font ss:FontName="MS Pゴシック" x:CharSet="128" x:Family="Modern" ss:Size="18"/> </Style> <Style ss:ID="s22"> <Alignment ss:Horizontal="CenterAcrossSelection" ss:Vertical="Center"/> </Style> <Style ss:ID="s24"> <Borders> <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="2"/> <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="2"/> </Borders> <Interior ss:Color="#C0C0C0" ss:Pattern="Solid"/> </Style> <Style ss:ID="s25"> <Borders> <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="2"/> </Borders> <Interior ss:Color="#C0C0C0" ss:Pattern="Solid"/> </Style> </Styles> <Worksheet ss:Name="test123"> <Table ss:ExpandedColumnCount="4" ss:ExpandedRowCount="3" x:FullColumns="1" x:FullRows="1" ss:DefaultColumnWidth="54" ss:DefaultRowHeight="13.5"> <Column ss:AutoFitWidth="0" ss:Width="17.25"/> <Column ss:AutoFitWidth="0" ss:Width="37.5" ss:Span="2"/> <Row ss:AutoFitHeight="0" ss:Height="21"> <Cell ss:Index="2" ss:StyleID="s21"/> <Cell ss:StyleID="s22"/> </Row> <Row ss:AutoFitHeight="0" ss:Height="14.25"/> <Row ss:AutoFitHeight="0"> <Cell ss:Index="2" ss:StyleID="s24"><Data ss:Type="String">testtest</Data></Cell> <Cell ss:StyleID="s25"/> </Row> </Table> <WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel"> <PageSetup> <Header x:Margin="0.31496062992125984"/> <Footer x:Margin="0.31496062992125984"/> <PageMargins x:Bottom="0.39370078740157483" x:Left="0.78740157480314965" x:Right="0.43307086614173229" x:Top="0.39370078740157483"/> </PageSetup> <Unsynced/> <FitToPage/> <Print> <ValidPrinterInfo/> <PaperSizeIndex>9</PaperSizeIndex> <Scale>99</Scale> <HorizontalResolution>600</HorizontalResolution> <VerticalResolution>600</VerticalResolution> </Print> <Selected/> <DoNotDisplayGridlines/> <Panes> <Pane> <Number>3</Number> <ActiveRow>1</ActiveRow> <ActiveCol>3</ActiveCol> </Pane> </Panes> <ProtectObjects>False</ProtectObjects> <ProtectScenarios>False</ProtectScenarios> </WorksheetOptions> </Worksheet> </Workbook> |
-- 作者:river_ppp -- 发布时间:4/2/2007 5:00:00 PM -- 无人回答啊? |
-- 作者:duotiger -- 发布时间:4/4/2007 11:07:00 AM -- 不会啊! |
-- 作者:mlhorizon -- 发布时间:5/23/2007 11:18:00 PM -- java的话用dom4j解析然后用jxl和poi基本能搞定 |
-- 作者:hongjuesir -- 发布时间:11/3/2007 9:13:00 PM -- 不是把这个文件的后缀名改称xls,不就能用excel打开了吗? |
W 3 C h i n a ( since 2003 ) 旗 下 站 点 苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》 |
58.594ms |