Python Forum
How do I write a line of code into an excel spreadsheet using Python code?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I write a line of code into an excel spreadsheet using Python code?
#1
My python code writing experience is scarcely a month and and I am now the proud parent of what has become a 500 line program written in python that process daily data so I can monitor my blood sugar. Results are presently written to a text file and it looks very 1980’s-ish. I want to create charts/graphs showing my trends and figure that Excel is a good way to do it.

I can now write the results to an excel file but only if I generate the entire output from all the data in the text file every time a new line of data is generated.

It would be far more efficient if I could append the daily line of data to the existing spreadsheet instead of rewriting it. As I see it, I would have to detect the last line written and go to the next row to place the new row of data.

Thoughts appreciated….
Reply


Messages In This Thread
How do I write a line of code into an excel spreadsheet using Python code? - by Emerogork - Feb-07-2018, 05:54 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Write from dictionary to excel divon 3 4,081 Jun-11-2023, 10:37 AM
Last Post: Larz60+
  problem of converting Matlab code to python DongyanZ 2 1,452 Feb-03-2023, 01:04 PM
Last Post: jefsummers
  Split excel file and write output at specific row and set sheet position DSCA 0 2,041 May-12-2022, 07:29 PM
Last Post: DSCA
  Reduce four for loops or parallelizing code in Python cee878 1 1,254 Feb-10-2022, 10:02 AM
Last Post: Larz60+
  [Pandas] Write data to Excel with dot decimals manonB 1 5,980 May-05-2021, 05:28 PM
Last Post: ibreeden
  Counting of rows in Excel Spreadsheet dakrantau 2 2,046 Sep-30-2020, 02:27 AM
Last Post: dakrantau
  How do I translate this into python code? (excel vlookup) eeps24 6 2,899 May-29-2020, 05:54 PM
Last Post: eeps24
  Python equivalent of Matlab code kwokmaster 5 7,166 Apr-03-2020, 12:02 AM
Last Post: scidam
  Read exel with merged cells and write to another excel SriMekala 0 3,029 Aug-10-2019, 07:14 AM
Last Post: SriMekala
  how read and write merged cells in excel SriMekala 1 15,248 Aug-07-2019, 11:27 PM
Last Post: scidam

Forum Jump:

User Panel Messages

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