a very straightforward task in VBA but am not sure how do I perform in python. Hypothetically if I have an excel called 'excel.xlsm', tab name is 'tabA' and I want to insert a value in cell D15, how do I do that in python?
-
This question has a lot of answers if searched on Google. Please do some research before asking on SO community.Abhay Salvi– Abhay Salvi2020-04-20 13:36:52 +00:00Commented Apr 20, 2020 at 13:36
-
Does this answer your question? Insert row into Excel spreadsheet using openpyxl in PythonMayank Porwal– Mayank Porwal2020-04-20 13:37:13 +00:00Commented Apr 20, 2020 at 13:37
-
@Mayank Porwal - thanks mate that was useful as well.TRex– TRex2020-04-20 14:00:52 +00:00Commented Apr 20, 2020 at 14:00
-
1@Abhay salvi - never heard of google, can you send me the link plz!TRex– TRex2020-04-20 14:01:30 +00:00Commented Apr 20, 2020 at 14:01
-
1@Abhaysalvi - thanks !TRex– TRex2020-04-20 15:50:33 +00:00Commented Apr 20, 2020 at 15:50
|
Show 2 more comments
2 Answers
I couldn't edit Tomfus's answer. To save you excel file after changes you made (otherwise you won't see updates in file). Run workbook.save('file path of your excel')
NOT: File path could be same file path/name that you used to open if you don't want to create copy. It will overwrite automatically