I’m writing a CSV file and need some blank fields inserted.
try: fo = open(filepathw, "a") fw = csv.writer(fo, delimiter=';')#, quotechar=' ', quoting=csv.QUOTE_MINIMAL) fw.writerow([wid, wksn, wksnbar, wktn, wktnbar, wI, wr, wcode, wncode, wprofile,]) fo.close() except Exception,e:
What I need is e.g.: fw.writerow([wid, wksn, wksnbar, “;;;;;;” wktn, wktnbar, wI, wr, “;;;” wcode, wncode, wprofile,])
However when the CSV is written the quotes are included. The rest of the data, wksn etc, comes from a scalarPrepQuery, so I tried having a static column in SQL with a semi-colon in it, but it still gets quote marks. As you can see from the commented out section I tried adding quoting style, no joy.