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.
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.
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.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.