Gents (and ladies)...
I'm trying to write data to an excel file while using python 2.4 on a PC running XP...
I can do the very basic of putting data in a txt file, when I provide the data. However...
With help from some of you I've writen a basic Web scrape that goes out and gets a number from a Web site. Is there a way to have my file write the results of the scrape, i feel as if there must be.
What i'm trying so far, with no avail is:
>>> writer = csv.writer(open ("some.csv", "wb"))
>>> writer.writerow s(scrape.findal l(results))
This is wrong for a ton of reason i'm sure. All it gives me is a file named "Some" with the 1st and only sheet called "some"
I was hoping that in the 2nd line ...>>> writer.writerow s(scrape.findal l(results))
would tell it to take the data collected by my scrape and put it in some.csv.
it of course, does not.
if i type print writer.writerow s(scrape.findal l(results)) it will return the number I want.
any thougths, suggestions, riducles?
pc
I'm trying to write data to an excel file while using python 2.4 on a PC running XP...
I can do the very basic of putting data in a txt file, when I provide the data. However...
With help from some of you I've writen a basic Web scrape that goes out and gets a number from a Web site. Is there a way to have my file write the results of the scrape, i feel as if there must be.
What i'm trying so far, with no avail is:
>>> writer = csv.writer(open ("some.csv", "wb"))
>>> writer.writerow s(scrape.findal l(results))
This is wrong for a ton of reason i'm sure. All it gives me is a file named "Some" with the 1st and only sheet called "some"
I was hoping that in the 2nd line ...>>> writer.writerow s(scrape.findal l(results))
would tell it to take the data collected by my scrape and put it in some.csv.
it of course, does not.
if i type print writer.writerow s(scrape.findal l(results)) it will return the number I want.
any thougths, suggestions, riducles?
pc
Comment