Python Forum
Edit Open and Active Excel sheet in Python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Edit Open and Active Excel sheet in Python
Hello community

This is Joe and i have decided to embark on learning how to code in Python after writing simple Macros in excel VB.

I am currently using anaconda/spyder.

My question is this:-
1)Can I open an excel spreadsheet via python
2) While the excel spreadsheet is open and active; change the data in the excel cells through python code such as print the numbers 1 through to 10 on different excel rows this is done as the excel spreadsheet is open?

I hope this makes sense.

Thank you for your input.
Quote:Can I open an excel spreadsheet via python
yes, you can use a pagkage like openpyxl (popular, see:
pandas is a better choice, but has a rather stiff learning curve (keep in mind, you will eventually want to switch).

will also work for your question 2

Possibly Related Threads…
Thread Author Replies Views Last Post
  Read and write active Excel file euras 4 636 Jun-29-2021, 11:16 PM
Last Post: Pedroski55
  Open an excel file Newbie1114 1 660 Jun-16-2021, 09:11 PM
Last Post: Gribouillis
  Python script for excel sheet Nabil 5 820 Jun-01-2021, 02:29 PM
Last Post: anuradha
  Add a new column when I extract each sheet in an Excel workbook as a new csv file shantanu97 0 698 Mar-24-2021, 04:56 AM
Last Post: shantanu97
  Append excel sheet using openpyxl TammyP 1 666 Feb-02-2021, 06:32 PM
Last Post: nilamo
  Help moding python script to edit Gcode AntaresSky 13 1,421 Jan-04-2021, 06:29 AM
Last Post: buran
  How to Copy Single Value From One Excel Sheet to Another SunWers 4 906 Dec-29-2020, 05:39 PM
Last Post: SunWers
Question Python + Google Sheet | Best way to update specific cells in a single Update()? Vokofe 1 681 Dec-16-2020, 05:26 AM
Last Post: Vokofe
  Active Directory add an attribute. SpongeB0B 2 763 Oct-13-2020, 05:36 AM
Last Post: SpongeB0B
  Writing to existing excel sheet jksvend 0 677 Oct-12-2020, 11:19 AM
Last Post: jksvend

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020