Monday, February 7, 2022

how to open excel , an excel instances in python

     Application                  = EnsureDispatch("Excel.Application")

    Application.DisplayAlerts    = False

    Application.Visible          = True

    Application.AskToUpdateLinks = False

    Application.EnableEvents     = False

    

    mapping_wb                   = Application.Workbooks.Open(os.path.join(os.getcwd(), "test.xlsx"))

    ws                           = mapping_wb.Worksheets("color_check")

    


file_path           =   os.path.join(input_folder,test_file_name)


            test_workbook                  =   Application.Workbooks.Open(file_path)


            test_sheet                  =   test_workbook.Worksheets("test_sheet")


            Application.Worksheets("test_sheet").Activate()


python class topic video