[Python example] Using Python to insert an example in Excel
I used Python to handle excel. I used openpyxl and pyexcel.
At present, I think other functions (such as using the formula in the lattice) should be used in addition to the aggregate functions)
You can use xlwings to Make Excel fly with Python! "It sounds worse than just warning.
The following describes how to insert the full program of the solution program into my Python on my Github.
#-*-Coding: UTF-8-*-from xlwings import Workbook, Sheet, Range, Chartimport win32com. client # Open the Excel worksheet xl = win32com. client. dispatch ("Excel. application ") # Do not let the excel sheet pop out xl. visible = Falsewb = xl. workbooks. open (R' the path to the Excel worksheet ') sheet = wb. activeSheet # This is an animated sheet inserted into the solution. range ("A1 "). addComment () # Let the sheet solution be seen in sheet. range ("A1 "). comment. visible = True # the string to be put in: commentString = 'Allow cannot be decrypted. '# because it is Chinese, please refer to commentString = (commentString ). decode ('utf-8') # Put the string into the sheet. range ("A1 "). comment. text (commentString) # Save the signature parameter wb. saveAs (r 'excel excel tutorial route') xl. displayAlerts = Falsewb. close (True) xl. quit ()