i can't see i'm doing wrong. i'm trying make program read excel file , create new file similar name , write excel row file.
the error occurs @ "for row in excelreader:"
here's code:
import os import csv dirlist=os.listdir("//gollum/tbg2/tbg2/forritgb") print dirlist filename in dirlist: if ".csv" in filename: open(filename, 'rb') csvfile: excelreader = csv.reader(csvfile) file=open("xml_"+dir, 'w+') row in excelreader: file.write(row) else: pass
close file after for row in excelreader:
loop
Comments
Post a Comment