سويفت API لتحويل XLSB إلى TIFF

مكتبة سويفت لتحويل XLSB إلى TIFF

استخدم Cells تحويل REST API لإنشاء سير عمل جدول بيانات مخصص في Swift. يعد هذا حلاً احترافيًا لتحويل XLSB إلى TIFF وتنسيقات المستندات الأخرى عبر الإنترنت باستخدام Swift.

تحويل ملف XLSB إلى TIFF في Swift

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

يعد تحويل تنسيقات الملفات من XLSB إلى TIFF مهمة معقدة. يتم تنفيذ جميع انتقالات تنسيق XLSB إلى TIFF بواسطة Swift SDK الخاص بنا مع الحفاظ على المحتوى الهيكلي والمنطقي الرئيسي لجدول بيانات XLSB المصدر. تعد مكتبة Swift الخاصة بنا حلاً احترافيًا لتحويل ملفات XLSB إلى TIFF عبر الإنترنت. يوفر Cloud SDK لمطوري Swift وظائف قوية وإخراج TIFF مثاليًا.

مثال التعليمات البرمجية في Swift باستخدام REST API لتحويل XLSB إلى تنسيق TIFF

// 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.xlsb"
    let format:String? = "tiff"     
    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.tiff"
            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)


كيفية استخدام Swift API لتحويل XLSB إلى TIFF

  1. قم بإنشاء حساب علىلوحة القيادة للحصول على تفاصيل الحصص والترخيص API مجانًا
  2. تهيئة CellsApi باستخدام معرف العميل وسر العميل وعنوان URL الأساسي وإصدار API
  3. قم باستدعاء أسلوب cellWorkbookPutConvertWorkbook للحصول على الدفق الناتج


متطلبات النظام

  1. ماك مونتيري 12.4
  2. سويفت 4.2