Skip to navigation
How to load and change a xlsx file by adding values to a specific column with python 3.4
28.11.15
example: get some extra data from a db and check if it can be added to the column P stypes = self.get_style_types() wb = load_workbook('orginal.xlsx') ws = wb.active for i in range(2, ws.max_row): style = ws['A'+str(i)].value if(style in stypes): ws['p'+str(i)] = str(stypes[style]) wb.save('new_document.xlsx')
http://openpyxl.readthedocs.org/en/latest/usage.html
Reply
Anonymous
Information Epoch 1732591611
Avoid captive user interfaces.
Home
Notebook
Contact us