Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
2537 มุมมอง

I have a button where I can attach a csv file and load a series of data contained in this file. However, I would like that once the file is read, the file is stored in another variable of the Binary type so that it can be viewed later. How could I do this? My code to read the csv file is the following:

csv_data = base64.b64decode(self.purchase_order_file)
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)

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi, you want to save your file in ir_attachment after read ?


Gus

อวตาร
ละทิ้ง
ผู้เขียน

Yes, how can i do this after mi code?

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มี.ค. 24
2203
1
พ.ย. 23
4173
3
ม.ค. 25
4015
2
พ.ค. 24
2476
2
พ.ค. 24
2377