Example #1
0
    def test_cells_save_as_post_document_save_as_pdf(self):
        """
        Test case for cells_save_as_post_document_save_as

        Convert document and save result to storage.
        """
        name = 'Book1.xlsx'
        saveOptions = PdfSaveOptions()
        saveOptions.OnePagePerSheet = True
        saveOptions.SaveFormat = "pdf"
        newfilename = "newbook.pdf"
        isAutoFitRows = True
        isAutoFitColumns = True
        folder = "PythonTest"
        result = AuthUtil.Ready(self.api, name, folder)
        self.assertTrue(len(result.uploaded) > 0)
        result = self.api.cells_save_as_post_document_save_as(
            name,
            save_options=saveOptions,
            newfilename=(folder + '/' + newfilename),
            is_auto_fit_rows=isAutoFitRows,
            is_auto_fit_columns=isAutoFitColumns,
            folder=folder)
        self.assertEqual(result.code, 200)
        pass
Example #2
0
    def test_cells_save_as_post_document_save_as_pdf(self):
        """
        Test case for cells_save_as_post_document_save_as

        Convert document and save result to storage.
        """
        name ='Book1.xlsx'    
        saveOptions = PdfSaveOptions()
        saveOptions.OnePagePerSheet = True
        saveOptions.SaveFormat = "pdf"
        newfilename = "newbook.pdf"
        isAutoFitRows= True
        isAutoFitColumns= True
        folder = "Temp"
        AuthUtil.Ready(name, folder)
        result = self.api.cells_save_as_post_document_save_as(name, save_options=saveOptions, newfilename=newfilename,is_auto_fit_rows=isAutoFitRows, is_auto_fit_columns=isAutoFitColumns,folder=folder)
        pass