Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2520 Lượt xem

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)

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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


Gus

Ảnh đại diện
Huỷ bỏ
Tác giả

Yes, how can i do this after mi code?

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 3 24
2172
1
thg 11 23
4154
3
thg 1 25
3998
2
thg 5 24
2459
2
thg 5 24
2353