Created
February 5, 2020 16:31
-
-
Save CoutinhoElias/3b213b76756984832fcfb6be348ae4e6 to your computer and use it in GitHub Desktop.
Salvar em excel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import xlsxwriter | |
line_data = [ | |
['000001 ', 'Emitido', '-'] | |
['000002 ', '-', 'VALOR 03'] | |
['000003 ', '-', 'VALOR 03'] | |
] | |
# exportando para excel | |
workbook = xlsxwriter.Workbook('filename.xlsx') | |
worksheet = workbook.add_worksheet() | |
print(line_data) | |
for line in range(0, len(line_data)): | |
for column in range(0, len(line_data)): | |
worksheet.write(column, line, line_data[line]) | |
workbook.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Notei alguns pontos que podem ser ajustados para isso funcionar adequadamente. Vou colar o código comentado, caso ainda tenha dúvida é só me pingar.