Swift API zum Konvertieren von NUMBERS in TSV

Swift-Bibliothek zum Konvertieren von NUMBERS in TSV

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 TSV und andere Dokumentformate zu konvertieren.

Konvertieren Sie eine NUMBERS-Datei in Swift in TSV

API
PUT
https://api.aspose.cloud/v3.0/cells/convert

Das Konvertieren von Dateiformaten von NUMBERS in TSV ist eine komplexe Aufgabe. Alle Formatübergänge von NUMBERS zum TSV 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 TSV-Dateien. Dieses Cloud SDK bietet Swift-Entwicklern leistungsstarke Funktionalität und perfekte TSV-Ausgabe.

Codebeispiel in Swift mit REST API zum Konvertieren von NUMBERS in das TSV-Format

// 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? = "tsv"     
    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.tsv"
            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 TSV umzuwandeln

  1. Erstellen Sie ein Konto unterArmaturenbrett um ein kostenloses API-Kontingent und Autorisierungsdetails zu erhalten
  2. Initialisieren Sie CellsApi mit Client-ID, Client-Geheimnis, Basis-URL und Version API
  3. Rufen Sie die Methode „cellsWorkbookPutConvertWorkbook“ auf, um den resultierenden Stream abzurufen


System Anforderungen

  1. macOS Monterey 12.4
  2. Swift 4.2