Java API to Export XLS to DOC

On Premise Java API to Export XLS to DOC without relying on Microsoft Excel®

How to Convert XLS to DOC via Java API

Rendering XLS to DOC is a two step process. You’ll first use Aspose.Cells for Java API to convert the given XLS document to PDF, and then by using Aspose.Pdf for Java API, you can easily convert your PDF document to DOC. Both APIs come under the collection of Aspose.Total for Java file format automation libraries.

XLS to DOC Conversion on Java

  1. Open XLS file using Workbook class
  2. Convert XLS to PDF and set SaveFormat to AUTO
  3. Load the converted PDF file using Document class
  4. Save the document to DOC format using save method and set Doc as SaveFormat

Get Started with Java File Format APIs

You can easily use Aspose.Total for Java directly from a Maven based project and include Aspose.Cells and Aspose.Pdf in your pom.xml.

Alternatively, you can get a ZIP file from downloads .

Java Code for XLS to DOC Conversion

Workbook book = new Workbook("input.xls");
// save XLS as PDF
book.save("pdfOutput.pdf", com.aspose.cells.SaveFormat.AUTO);
// load the PDF file using Document class
Document document = new Document("pdfOutput.pdf");
// save document in DOC format
document.save("output.doc", com.aspose.pdf.SaveFormat.Doc);  

XLS What is XLS File Format?

Files with XLS extension represent Excel Binary File Format. Such files can be created by Microsoft Excel as well as other similar spreadsheet programs such as OpenOffice Calc or Apple Numbers. File saved by Excel is known as Workbook where each workbook can have one or more worksheets. Data is stored and displayed to users in table format in worksheet and can span numeric values, text data, formulas, external data connections, images, and charts. Applications like Microsoft Excel lets you export workbook data to several different formats including PDF, CSV, XLSX, TXT, HTML, XPS, and several others. The XLS file format was replaced with a more open and structured format, XLSX, with the release of Microsoft Excel 2007. The latest versions still provide support for creating and reading XLS files, though XLSX is the first choice of use now.

Read More

DOC What is DOC File Format?

Files with .doc extension represent documents generated by Microsoft Word or other word processing documents in binary file format. The extension was initially used for plain text documentation on several different operating systems. It can contain several different types of data such as images, formatted as well as plain text, graphs, charts, embedded objects, links, pages, page formatting, print settings and a lot others.

Read More

Other Conversion Options

XLS TO PPTX (Open XML presentation Format)
XLS TO DOCX (Office 2007+ Word Document)