def test_cells_post_update_worksheet_cell_style(self):
        """
        Test case for cells_post_update_worksheet_cell_style

        Update cell's style.
        """
        name = 'Book1.xlsx'
        sheet_name = 'Sheet1'
        cellName = 'C1'
        style = Style()
        font = Font()
        font.is_bold = True
        font.size = 10
        style.font = font
        folder = "PythonTest"
        result = AuthUtil.Ready(self.api, name, folder)
        self.assertTrue(len(result.uploaded) > 0)

        result = self.api.cells_post_update_worksheet_cell_style(name,
                                                                 sheet_name,
                                                                 cellName,
                                                                 style=style,
                                                                 folder=folder)
        self.assertEqual(result.code, 200)
        pass
    def test_cells_post_row_style(self):
        """
        Test case for cells_post_row_style

        Set row style.
        """
        name = 'Book1.xlsx'
        sheet_name = 'Sheet1'
        rowIndex = 1
        style = Style()
        font = Font()
        font.is_bold = True
        font.size = 10
        style.font = font
        folder = "PythonTest"
        result = AuthUtil.Ready(self.api, name, folder)
        self.assertTrue(len(result.uploaded) > 0)

        result = self.api.cells_post_row_style(name,
                                               sheet_name,
                                               rowIndex,
                                               style=style,
                                               folder=folder)
        self.assertEqual(result.code, 200)
        pass
Exemplo n.º 3
0
    def test_cells_post_update_worksheet_range_style(self):
        """
        Test case for cells_post_update_worksheet_range_style

        Update cell's range style.
        """
        name ='Book1.xlsx'
        sheet_name ='Sheet1'
        range = 'C1:F10' 
        style = Style()
        font = Font()
        font.is_bold = True
        font.size = 10
        style.font = font
        folder = "Temp"
        AuthUtil.Ready(name, folder)
        self.api.cells_post_update_worksheet_range_style(name, sheet_name, range, style=style, folder=folder)
        pass
Exemplo n.º 4
0
    def test_cells_post_row_style(self):
        """
        Test case for cells_post_row_style

        Set row style.
        """
        name ='Book1.xlsx'
        sheet_name ='Sheet1'
        rowIndex = 1  
        style = Style()
        font = Font()
        font.is_bold = True
        font.size = 10
        style.font = font
        folder = "Temp"
        AuthUtil.Ready(name, folder)
        self.api.cells_post_row_style(name, sheet_name, rowIndex, style=style,folder=folder)
        pass
Exemplo n.º 5
0
import os
import sys

ABSPATH = os.path.abspath(os.path.realpath(os.path.dirname(__file__)) + "/..")
sys.path.append(ABSPATH)
import asposecellscloud
from asposecellscloud.rest import ApiException
from asposecellscloud.apis.cells_api import CellsApi
import AuthUtil
from asposecellscloud.models import CalculationOptions
from asposecellscloud.models import FontSetting
from asposecellscloud.models import Font
from asposecellscloud.models import Style


api_client = AuthUtil.GetApiClient()
api = asposecellscloud.apis.cells_api.CellsApi(api_client)
        name ='Book1.xlsx'
        sheet_name ='Sheet1'
        cellName = 'C1' 
        style = Style()
        font = Font()
        font.is_bold = True
        font.size = 10
        style.font = font
        folder = "Temp"
        AuthUtil.Ready(name, folder)
        self.api.cells_post_update_worksheet_cell_style(name, sheet_name, cellName, style=style, folder = folder)