1
I have created a Python csv in several ways as can be seen below, but every time I open the file opens the import screen as below.
Why does this happen?
And how can I make the file open directly, within csv standards?
Detail: I’m using Libre Office to open the file.
Code 1:
import csv
csvfile = "arquivo.csv"
f=open(csvfile,'wb') # abre o arquivo para escrita apagando o conteúdo
csv.writer(f, delimiter =' ',quotechar =',',quoting=csv.QUOTE_MINIMAL)
Code 2:
import csv
c = csv.writer(open("teste.csv", "w"))
Code 3:
Arquivo = open(Diretorio + "relatorios/" + nome_arquivo_csv, "a")
Arquivo.write('\n' +valores_str + '\t' + medidas_str)
Arquivo.close()
I don’t think it’s related to Python, but to Libreoffice
– Denis Rudnei de Souza
Good thing it opens, otherwise there was no way to know which character(s) column splitter
– Miguel