C++ API to Convert DOC to XLS

Export DOC to XLS via C++ without using Microsoft® Word or Microsoft® Excel

 

You can include DOC to XLS conversion feature within your C++ applications easily. By using feature-rich, powerful and easy to use document manipulation and conversion API Aspose.Words for C++ , you can export DOC to HTML. After that, by using Aspose.Cells for C++ , you can convert HTML to XLS. Both APIs come under Aspose.Total for C++ package.

C++ API to Convert DOC to XLS

  1. Open DOC file using Document class reference
  2. Convert DOC to HTML by using Save member function
  3. Load HTML document by using IWorkbook class reference
  4. Save the document to XLS format using Save member function

Get Started with C++ File Automation APIs

Install from command line as nuget install Aspose.Total.Cpp or via Package Manager Console of Visual Studio with Install-Package Aspose.Total.Cpp.

Alternatively, get the offline MSI installer or DLLs in a ZIP file from downloads .

Access DOC Document Properties via C++

Aspose.Words for C++ also allows you to access document properties of DOC file and lets you take an informed decision before the conversion process. To access document properties you can use BuiltInDocumentProperties to obtain built-in properties and CustomDocumentProperties to obtain custom properties. The following code example shows how to enumerate all built-in and custom properties in a document.

Save XLS File to Stream via C++

After converting DOC to XLS, Aspose.Cells for C++ enables you to save your document to stream. To save files to a stream, create a MemoryStream or FileStream object and save the file to that stream object by calling the IWorkbook object’s Save method. Specify the desired file format using the SaveFormat enumeration when calling the Save method.

Other Conversion Options

DOC TO CSV (Comma Seperated Values)
DOC TO XLAM (Excel Macro-Enabled Add-In)
DOC TO SXC (StarOffice Calc Spreadsheet)
DOC TO TSV (Tab Seperated Values)
DOC TO XLT (Excel 97 - 2003 Template)
DOC TO DIF (Data Interchange Format)
DOC TO XLSM (Macro-enabled Spreadsheet)
DOC TO XLTM (Excel Macro-Enabled Template)
DOC TO XLSX (Open XML Workbook)
DOC TO XLSB (Excel Binary Workbook)
DOC TO FODS (OpenDocument Flat XML Spreadsheet)
DOC TO ODS (OpenDocument Spreadsheet)
DOC TO XLTX (Excel Template)

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

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