Bottom Page

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….
Quote
#2
it depends on what package you use, but all of them have respective methods to write to specific cell/range
Quote
#3
Python Excel The Definitive Guide
So there are serval ways,i like best Pandas in Jupyter notebook.
Dataframe look similar to Excel and can export to Excel,or drop Excel and do all in tool over
Common Excel Tasks Demonstrated in Pandas
Quote: I want to create charts/graphs showing my trends and figure that Excel is a good way to do it.
This is also something that tool i mention has very good support better than Excel.
Example Vis1, Vis2.
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Read exel with merged cells and write to another excel SriMekala 0 403 Aug-10-2019, 07:14 AM
Last Post: SriMekala
  how read and write merged cells in excel SriMekala 1 421 Aug-07-2019, 11:27 PM
Last Post: scidam
  Python Package for deploying python code in Excel on machines without python UGuntupalli 2 3,427 Jul-31-2019, 04:05 AM
Last Post: UGuntupalli
  Python write result of VAR to excel file wissam1974 8 680 Jul-13-2019, 01:09 PM
Last Post: wissam1974
  python code for Bartlett confidential band wissam1974 2 484 Feb-16-2019, 02:25 PM
Last Post: wissam1974
  Newbie at using python and tensorflow getting error when running simple code FeatherineAu 0 1,619 Sep-28-2018, 02:09 PM
Last Post: FeatherineAu
  Help with Python technologies and structure code giu88 13 1,445 Aug-11-2018, 10:15 PM
Last Post: ichabod801
  Pandas - Write to Exisitng Excel File - Sorted List dj99 4 2,692 Jul-29-2018, 07:56 AM
Last Post: dj99
  Need tips for speeding up python code iineo 1 650 May-29-2018, 12:57 AM
Last Post: micseydel
  Python code optimization problem servanm 2 693 May-23-2018, 01:28 PM
Last Post: servanm

Forum Jump:


Users browsing this thread: 1 Guest(s)