Installed Python 3.4 and modules jdcal and openpyxl:
Trying myself on the openpyxl library to read and write XLSX files from Python. I installed the jdcall module and the openpyxl module. Code lets me create the workbook and work sheet:
from openpyxl import Workbook
wb = Workbook()
ws = wb.active
However, if I try to write to the first cell like this:
ws[ 1, 1] = 'testing 1-2-3'
Python says:
C:\Wolf\Python Studies>database.py Traceback (most recent call last): File "C:\Wolf\Python Studies\database.py", line 13, in <module> ws[ 1, 1] = 'testing 1-2-3' File "C:\Python34\lib\site-packages\openpyxl-2.2.0b1-py3.4.egg\openpyxl\worksheet\worksheet.py", line 403, in __setitem__ self[key].value = value File "C:\Python34\lib\site-packages\openpyxl-2.2.0b1-py3.4.egg\openpyxl\worksheet\worksheet.py", line 400, in __getitem__ <BR> return self._get_cell(key) File "C:\Python34\lib\site-packages\openpyxl-2.2.0b1-py3.4.egg\openpyxl\worksheet\worksheet.py", line 368, in _get_cell coordinate = coordinate.upper() AttributeError: 'tuple' object has no attribute 'upper' C:\Wolf\Python Studies>
Any idea what I am doing wrong?
A1) and not as indices.