0

how to read spread sheet in python. I have a package XLW to generate a spread sheet, but i din't find method to read.
How to read spread sheet?

Please help me.
Thanks,
kath.

2
Contributors
1
Reply
3
Views
11 Years
Discussion Span
Last Post by vegaseat
0

If your spreadsheet writes out a CSV file, then you are in luck!

A CSV file is basically a text file that contains each row in a line, with the cell Values Separated by Commas (hence CSV). Now you can use readlines() to generate a list of lines for processing.

Actually Python has a csv module to do most of the chore for you, take a look at this simple example:

import csv
reader = csv.reader(open("some.csv", "rb"))
for row in reader:
    print row

Read the Python manual under csv.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.