Rookie question:
I am using the .to_csv() command to convert some data from a table to a CSV file but when doing that, I get one column with the row ID. Is there an easy way to avoid sending that to the CSV file?
ianb
August 22, 2022, 4:26pm
2
@gilberto.franco Welcome to the forum, here you go:
‘’’
@anvil.server.callable
def DownloadCSVLoadout():
print("!!! Exporting Loadout CSV")
self.link_1.url = app_tables.loadout.search().to_csv().url
‘’’
I have a data table that Im building, and I have it exporting to a downloadable CSV. Everything is working great, except I dont want to export the default ID column from the database.
Any tips on how I can exclude only that default column when I build the CSV?
app_tables.loadout.search().to_csv().url
Would this be in search() ?
For some reason I could not get this to show up easily using the forum search. It might be because the word ID is in quotes in the title.
2 Likes