Swift API to save NUMBERS as XLTX

Swift library to save NUMBERS as XLTX

Use Cells SaveAs REST API to create customized spreadsheet workflows in Swift. This is a professional solution to save NUMBERS as XLTX and other document formats online using Swift.

Save a NUMBERS file as XLTX in Swift

API
POST
https://api.aspose.cloud/v3.0/cells/{name}/SaveAs

Saving file formats from NUMBERS as XLTX is a complex task. All NUMBERS to XLTX format transitions is performed by our Swift SDK while maintaining the source NUMBERS spreadsheet's main structural and logical content. Our Swift library is a professional solution to save NUMBERS as XLTX files online. This Cloud SDK gives Swift developers powerful functionality and perfect XLTX output.

Code example in Swift using REST API to save NUMBERS as XLTX 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 {
            return
        }
        expectation1.fulfill()
    }
    self.waitForExpectations(timeout: testTimeout, handler: nil)     
    let expectation = self.expectation(description: "saveAs")
    let name:String = BOOK1.numbers
    let saveOptions:PdfSaveOptions? = PdfSaveOptions(enableHTTPCompression: nil, saveFormat: "pdf", clearData: nil, cachedFileFolder: nil, validateMergedAreas: nil, refreshChartCache: nil, createDirectory: nil, sortNames: nil, calculateFormula: nil, checkFontCompatibility: nil, onePagePerSheet: true, compliance: nil, defaultFont: nil, printingPageType: nil, imageType: nil, desiredPPI: nil, jpegQuality: nil, securityOptions: nil)
    let newfilename:String = "newbook.xltx"
    let isAutoFitRows:Bool? = true
    let isAutoFitColumns:Bool? = true
    let folder:String = TEMPFOLDER
    let storageName:String? = nil        
    CellsAPI.cellsSaveAsPostDocumentSaveAs(name: name, saveOptions: saveOptions, newfilename: newfilename, isAutoFitRows: isAutoFitRows, isAutoFitColumns: isAutoFitColumns, folder: folder, storageName: storageName)
    {
        (response, error) in
        guard error == nil else {
            return
        }            
        if let response = response {
            expectation.fulfill()
        }
    }
    self.waitForExpectations(timeout: testTimeout, handler: nil)


How to use Swift API to save NUMBERS as XLTX

  1. Create an account at Dashboard to get free API quota & authorization details
  2. Initialize CellsApi with Client Id, Client Secret, Base URL & API version
  3. Call cellsSaveAsPostDocumentSaveAs method to get the resultant stream


System Requirements

  1. macOS Monterey 12.4
  2. Swift 4.2