Swift API zum Konvertieren von NUMBERS in PPTX
Swift-Bibliothek zum Konvertieren von NUMBERS in PPTX
Verwenden Sie Cells Conversion REST API, um benutzerdefinierte Tabellenkalkulations-Workflows in Swift zu erstellen. Dies ist eine professionelle Lösung, um NUMBERS online mit Swift in PPTX und andere Dokumentformate zu konvertieren.
Konvertieren Sie eine NUMBERS-Datei in Swift in PPTX
API
PUT
https://api.aspose.cloud/v3.0/cells/convert
Das Konvertieren von Dateiformaten von NUMBERS in PPTX ist eine komplexe Aufgabe. Alle Formatübergänge von NUMBERS zu PPTX werden von unserem Swift SDK durchgeführt, wobei der strukturelle und logische Hauptinhalt der NUMBERS-Quelltabelle erhalten bleibt. Unsere Swift-Bibliothek ist eine professionelle Lösung zum Online-Konvertieren von NUMBERS in PPTX-Dateien. Dieses Cloud SDK bietet Swift-Entwicklern leistungsstarke Funktionalität und perfekte PPTX-Ausgabe.
// For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-swift/
import AsposeCellsCloud
let expectation1 = self.expectation(description: "checkAuth")
AsposeCellsCloudAPI.clientId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
AsposeCellsCloudAPI.clientSecret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
AuthAspose.checkAuth()
{
(authError) in
guard authError == nil else {
XCTFail("error checkAuth")
return
}
expectation1.fulfill()
}
self.waitForExpectations(timeout: testTimeout, handler: nil)
let expectation = self.expectation(description: "PutConvert")
let workbook:String = "Book1.numbers"
let format:String? = "pptx"
let url1: URL? = getURL(workbook)
let filedata = NSData(contentsOfFile: url1!.path)
let password:String? = nil
let outPath:String? = nil
CellsAPI.cellsWorkbookPutConvertWorkbook(file: url1!, format: format, password: password, outPath: outPath)
{
(response, error) in
guard error == nil else {
let errorinfo = self.GetErrorDataInfo(error: error as! ErrorResponse)
print("error info: \(errorinfo!)")
XCTFail("error PutConvert")
return
}
if let response = response {
//response is a Data of file, we may write it down and check it.
let fileName = "dest.pptx"
let filePath = NSHomeDirectory()
let fileManager = FileManager.default
let path = "\(filePath)/tmp/\(fileName)"
fileManager.createFile(atPath: path, contents:nil, attributes:nil)
let handle = FileHandle(forWritingAtPath:path)
handle?.write(response as Data)
expectation.fulfill()
}
}
self.waitForExpectations(timeout: testTimeout, handler: nil)
So verwenden Sie Swift API, um NUMBERS in PPTX zu konvertieren
- Erstellen Sie ein Konto unterArmaturenbrett um ein kostenloses API-Kontingent und Autorisierungsdetails zu erhalten
- Initialisieren Sie CellsApi mit Client-ID, Client-Geheimnis, Basis-URL und Version API
- Rufen Sie die Methode „cellsWorkbookPutConvertWorkbook“ auf, um den resultierenden Stream abzurufen
System Anforderungen
- macOS Monterey 12.4
- Swift 4.2