I am using python v3 xlwings library to interact with MS Excel. I have a csv file ToCopy.csv
and would like to copy the entire contents of this cvs file into an Excel file.
import xlwings as xw
Book_name = 'C:/Temp/ExcelBook.xlsm'
sheet_name = 'SheetName' #paste into this sheet
wb = xw.Book(Book_name)
sht = wb.sheets[sheet_name]
I looked at xlwings documentation but am still at a loss on how to get started. Can someone give me a head-start?
I am open to using other methods which are not based on xlwings library. However, my Excel file is password-protected and I know xlwings can handle password-protected Excel files. I am not sure about other methods.
So from the documentation http://docs.xlwings.org/en/stable/quickstart.html
In the first example, a value is written to location A1. In the second, value are being written A1, B1, C1 and A2, B2, C2
So you probably want to do something like
Other options: