how to skip default headers while export to csv in web2py? -


how skip default headers while export csv in web2py? have added titles defining separately.

s = stringio()         csv_writer = csv.writer(s)         # write first row specified column headings/names         field_names = ['usrid', 'category', 'location', 'name']         csv_writer.writerow(field_names)         self.rows.export_to_csv_file(s, represent=true) 

csv_writer.writerow(field_names) - line prints defined heading .rows.export_to_csv_file again prints default heading in second row. how rid of default headings? in advance!

the export_to_csv_file method takes write_colnames argument:

self.rows.export_to_csv_file(s, represent=true, write_colnames=false) 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -