Why to Convert XPS to CSV
XPS (XML Paper Specification) is a document format developed by Microsoft for printing and viewing documents. It is similar to PDF format but XPS documents are more structured and can be edited. On the other hand, CSV (Comma Separated Values) is a plain text format used for storing tabular data. It is widely used for data exchange between different applications. Therefore, it is necessary to convert XPS to CSV in order to make the data accessible to other applications.
How Aspose.Total Helps for XPS to CSV Conversion
Aspose.Total for Android via Java is a suite of APIs that provides a comprehensive set of tools for developers to work with documents, images, and other file formats. It includes two APIs, Aspose.PDF for Android via Java and Aspose.Cells for Android via Java, which can be used to convert XPS to CSV.
Using Aspose.PDF for Android via Java, you can convert XPS to XLSX, which is an Excel spreadsheet format. Then, you can use Aspose.Cells for Android via Java to convert XLSX to CSV. This two-step process can be easily integrated into your Android applications.
Aspose.PDF for Android via Java provides a wide range of features for manipulating PDF documents. It can be used to convert PDF to other file formats, such as XPS, HTML, and XLSX. It also supports features such as document splitting, merging, and page reordering.
Aspose.Cells for Android via Java is a powerful spreadsheet processing API that can be used to create, read, and manipulate Excel spreadsheets. It supports features such as data import and export, formula calculation, and chart creation. It can also be used to convert XLSX to CSV.
By using Aspose.Total for Android via Java, you can easily integrate XPS to CSV conversion feature into your Android applications. It provides a comprehensive set of tools for working with documents, images, and other file formats.
Android API to Render XPS to CSV
Get Started with Android via Java APIs
You can easily use Aspose.Total for Android via Java directly from Maven and install Aspose.PDF for Android via Java and Aspose.Cells for Android via Java in your applications.
Alternatively, you can get a ZIP file from downloads .
// supports PDF, CGM, EPUB, TeX, PCL, PS, SVG, XPS, MD, MHTML, XML, and XSLFO file format | |
// load PDF with an instance of Document | |
Document document = new Document("template.pdf"); | |
// save document in XLSX format | |
document.save("XlsxOutput.xlsx", SaveFormat.Xlsx); | |
// load the XLSX file in an instance of Workbook | |
Workbook book = new Workbook("XlsxOutput.xlsx"); | |
// supports CSV, XLSB, XLSM, XLT, XLTX, XLTM, XLAM, TSV, TXT, ODS, DIF, MD, SXC, and FODS file format | |
// save XLSX as CSV | |
book.save("output.csv", SaveFormat.AUTO); |
Get XMP Metadata of XPS File in Android Apps
Aspose.PDF for Android via Java allows you to access a XPS file’s XMP metadata. In order to get the metadata, create a Document object and open the input XPS file and use the getMetadata() property to get the metadata.
// supports PDF, CGM, EPUB, TeX, PCL, PS, SVG, XPS, MD, MHTML, XML, and XSLFO file format | |
// Open document | |
Document pdfDocument = new Document("input.pdf"); | |
// get create date property | |
System.out.println("xmp:CreateDate: " + pdfDocument.getMetadata().get_Item("xmp:CreateDate")); | |
// get nickname property | |
System.out.println("xmp:Nickname: " + pdfDocument.getMetadata().get_Item("xmp:Nickname")); | |
// get custom property | |
System.out.println("xmp:CustomProperty: " + pdfDocument.getMetadata().get_Item("xmp:CustomProperty")); |
Protect CSV Document in Android via Java
Aspose.Cells for Android via Java supports protecting your CSV file depending upon your needs. In order to protect your document you can use protectSharedWorkbook method of Workbook class.
// supports CSV, XLSB, XLSM, XLT, XLTX, XLTM, XLAM, TSV, TXT, ODS, DIF, MD, SXC, and FODS file format | |
// open CSV file format | |
Workbook wb = new Workbook("output.csv"); | |
// protect the shared workbook with password | |
wb.protectSharedWorkbook("1234"); | |
// save the output Excel file | |
wb.save("unprotected.csv"); |