Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
9220 Weergaven

Hi,
i have uploaded an csv file into a wizard, and how i access the values in the csv file from the BINARY FIELD. please help!

Thanks

Avatar
Annuleer
Beste antwoord

Hi,

If you are looking to read a csv file you can try the following code

csv_data = base64.b64decode('your binary field')
data_file = io.StringIO(csv_data.decode("utf-8"))
data_file.seek(0)
file_reader = []
csv_reader = csv.reader(data_file, delimiter=',')
file_reader.extend(csv_reader)

in the above code the data will be in file_reader

Regards

Avatar
Annuleer
Auteur

Thanks for the reply, can i read .xls with above method?