Exportieren Sie die Arbeitsmappe von Excel nach XPS

Android-Bibliothek zum Exportieren von WORKBOOK in die Datei XPS

Verwenden Sie Export API von Cells Cloud, um interne Objektworkflows der Datei Excel in Android zu exportieren. Dies ist eine professionelle Lösung zum Exportieren von WORKBOOK in eine Datei im XPS-Format aus einer Tabellenkalkulation online mit Android.

Exportieren Sie das WORKBOOK-Objekt in eine Datei im Format XPS mit dem Cloud SDK Cells für Android

API
POST
https://api.aspose.cloud/v3.0/cells/export

Das Exportieren eines WORKBOOK-Objekts aus der Datei Excel in die Datei XPS ist eine komplexe Aufgabe. Der Export von WORKBOOK in das XPS-Format wird von unserem Android SDK durchgeführt, während der Hauptstruktur- und logische Inhalt der WORKBOOK-Quelltabelle erhalten bleibt. Unsere Android-Bibliothek ist eine professionelle Lösung zum Online-Export von WORKBOOK-Objekten in Dateien im Format XPS. Dieses Cloud SDK bietet Android-Entwicklern leistungsstarke Funktionalität und eine perfekte XPS-Ausgabe.

Codebeispiel in Android mit REST API zum Exportieren von WORKBOOK aus der Tabelle in das Format XPS

// For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-android/
    import java.io.*;
    import java.util.HashMap;
    import java.util.List;
    import java.util.Base64;
    import com.aspose.cloud.cells.api.*;
    import com.aspose.cloud.cells.model.*;
    public class Export {
        public static void main(String[] args) {
            String format = "xps";
            String objectType = "workbook";
            HashMap<String,File> fileMap = new HashMap<String,File>();
            fileMap.put("Book1.xlsx" ,new File("C:\Book1.xlsx") );
            fileMap.put("myDocument.xlsx" ,new File("C:\myDocument.xlsx") );
            try {
                LightCellsApi cellsApi = new LightCellsApi(System.getenv("ProductClientId"), System.getenv("ProductClientSecret"),"v3.0","https://api.aspose.cloud");
                FilesResult response = cellsApi.postExport(fileMap,objectType, format,null);            
                List<FileInfo> files = response.getFiles();
                String filename = files.get(0).getFilename();
                String fileContent = files.get(0).getFileContent();
                byte[] data = Base64.getDecoder().decode(fileContent);
                OutputStream outputStream = new FileOutputStream(filename);
                outputStream.write(data,0,data.length);
                outputStream.close();
            }catch(Exception exception )
            {
                System.out.print(exception);
            }
        }
    }


So verwenden Sie Cells Cloud SDK für Android, um Objekte aus Excel WORKBOOK nach XPS zu exportieren

  1. Registrieren Sie ein Konto unterArmaturenbrett um ein kostenloses API-Kontingent und Autorisierungsdetails zu erhalten
  2. Initialisieren Sie Cells API mit Ihrer Client-ID, Ihrem Client-Geheimnis, Ihrer Basis-URL und Ihrer Version API.
  3. Verwenden Sie die Methode `postExport`, um den resultierenden Stream abzurufen.


System Anforderungen

  1. Android 7 oder neuer
  2. Java(TM) SE-Laufzeitumgebung