M
M
Maxim2014-04-15 09:53:01
Python
Maxim, 2014-04-15 09:53:01

Why doesn't openpyxl open the generated file?

Hello.
I'm trying to create a file, everything works without errors, but the created file does not open. Libre Office only creates the .~lock.test.xlsx# file and closes immediately.

from openpyxl import Workbook

wb = Workbook()
ws = wb.active
ws['A4'] = 4
wb.save(filename='test.xlsx')

If you open the openpyxl file , then everything works correctly.
Tell me, where, what could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xandox, 2014-04-15
@Masik

The problem is most likely in LibreOffice. Your code works fine for me. And LibreOffice opens it normally. LO Version: 4.1.3.2
Build ID: 70feb7d99726f064edab4605a8ab840c50ec57a

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question