Python Forum
User Interaction with Excel sheet
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
User Interaction with Excel sheet
#8
Reading a csv from excel is not a the same Excel file formats.
Excel can read and output text file formats as txt,csv ect...
If have csv file can read it as normal file or use csv module.

data.csv:
Output:
Year,Make,Model,Length 1997,Ford,E350,2.34 2000,Mercury,Cougar,2.38
import csv

with open('data.csv') as f:
    data = csv.reader(f, delimiter=',')
    for row in data:
        print(row)
Output:
['Year', 'Make', 'Model', 'Length'] ['1997', 'Ford', 'E350', '2.34'] ['2000', 'Mercury', 'Cougar', '2.38']
Quote:Ok thank you, let me check. And can I pass the file object as an argument for the other function and access the file contents in the other function? Is it possible?? If so,please give me a articles to move forward.
That's no problem,you most explain better what you want do.
Reply


Messages In This Thread
User Interaction with Excel sheet - by ShruthiLS - Jun-14-2018, 12:05 PM
RE: User Interaction with Excel sheet - by Larz60+ - Jun-14-2018, 02:42 PM
RE: User Interaction with Excel sheet - by snippsat - Jun-14-2018, 03:33 PM
RE: User Interaction with Excel sheet - by Larz60+ - Jun-15-2018, 09:09 AM
RE: User Interaction with Excel sheet - by Larz60+ - Jun-15-2018, 01:48 PM
RE: User Interaction with Excel sheet - by snippsat - Jun-15-2018, 03:50 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Simple linear regression with interaction summary table Andrzej_Andrzej 0 410 Feb-21-2024, 07:44 AM
Last Post: Andrzej_Andrzej
  Split excel file and write output at specific row and set sheet position DSCA 0 2,085 May-12-2022, 07:29 PM
Last Post: DSCA
  Protein interaction chains Amniote 2 2,273 Jun-12-2019, 03:32 PM
Last Post: Amniote
  How to import dats from one sheet to another sheet based on Substring using python Vigneshkumarsakthivel 0 2,420 Sep-05-2018, 01:49 PM
Last Post: Vigneshkumarsakthivel

Forum Jump:

User Panel Messages

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