0
I am inserting the data into the file correctly, but when I open the file in Excel, the data is all in the same field in the table. Follows the code:
import csv
dados = open('DATA.csv','w')
try:
writer = csv.writer(dados)
writer.writerow(('Pais','Região','Status'))
writer.writerow(('Brail','America do Sul','Emergente'))
writer.writerow(('Argentina','Amerida do Sul','Subdesenvolvido'))
finally:
dados.close()
print(open("DATA.csv","rt").read())
Soon after entering this data, I wanted to open in Excel, and appear a row with three fields containing Country, Region and Status, where in the case would be my table header, so below would have the values. Someone can tell me the problem ?
I want after the execution of the code, I open the CSV file in Excel and in each fields is the value I entered with write.
– user114629