First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
Where do you assign a value to xlsfile?
2 | No.2 Revision |
Where do you assign a value to xlsfile?
To elaborate: 'r' is specifying read on an existing file.
From the documentation: (1) When used to create new Excel files or add worksheets to existing Excel files: testxls = excelpy.workbook() testxls = excelpy.workbook(r"c:\working dir\ex1.xls") testxls = excelpy.workbook(r"c:\working dir\ex1.xls", "MySheet") or testxls = excelpy.workbook(r"c:\working dir\ex1.xls", "MySheet", False) or testxls = excelpy.workbook(r"c:\working dir\ex1.xls", "MySheet", False, 'w') or testxls = excelpy.workbook(xlsfile=r"c:\working dir\ex1.xls", sheet="MySheet", overwritesheet=False, mode='w') (2) When used to read existing Excel files: testxls = excelpy.workbook(r"c:\working dir\ex1.xls", mode='r')
3 | No.3 Revision |
Where do you assign a value to xlsfile?
To elaborate: 'r' is specifying read on an existing file.
From the documentation:
documentation:
(1) When used to create new Excel files or add worksheets to existing Excel files:
testxls = excelpy.workbook()
testxls = excelpy.workbook(r"c:\working dir\ex1.xls")
testxls = excelpy.workbook(r"c:\working dir\ex1.xls", "MySheet") or
testxls = excelpy.workbook(r"c:\working dir\ex1.xls", "MySheet", False) or
testxls = excelpy.workbook(r"c:\working dir\ex1.xls", "MySheet", False, 'w') or
testxls = excelpy.workbook(xlsfile=r"c:\working dir\ex1.xls", sheet="MySheet",
overwritesheet=False, mode='w')
(2) When used to read existing Excel files:
testxls = excelpy.workbook(r"c:\working dir\ex1.xls", mode='r')mode='r')