编程知识 cdmana.com

The control made in China is short, flat and fast. In Java, XML is transformed into excel by programming

Spire.XLS for Java It's professional Java Excel API, So that developers don't need to use Microsoft Office or Microsoft Excel You can create , management , operation , Conversion and printing Excel Worksheet .

This paper introduces the use of Spire.XLS for Java take XML The file to Excel Methods , Including conversion to .xlsx / .xls etc. . As a free download Spire.XLS


 
import com.spire.xls.*; public class xmltoexcel { public static void main(String[] args) { // load xml file  Workbook wb = new Workbook(); wb.loadFromXml("test.xml"); // To xlsx Format Excel wb.saveToFile("xmltoExcel.xlsx",FileFormat.Version2013); // To xls Format Excel wb.saveToFile("xmltoExcel.xls",FileFormat.Version97to2003); } }

For testing xml The documents are as follows :

Excel Java Components Spire.XLS course : take  XML  To  Excel

Conversion result :

Excel Java Components Spire.XLS course : take  XML  To  Excel

版权声明
本文为[mnrssj]所创,转载请带上原文链接,感谢
https://cdmana.com/2021/04/20210408114208330D.html

Scroll to Top