V
V
Vyacheslav Grachunov2020-09-21 21:44:35
Python
Vyacheslav Grachunov, 2020-09-21 21:44:35

How to convert a file with a similar structure to normal *.xlsx?

There is a file with such a structure, I give a piece:

https://pastebin.com/7tt0g3VB

Can it be converted to *.xlsx by any Python library?
It currently uses win32com.client and win32.gencache.EnsureDispatch('Excel.Application'), but this only works on Windows and with Microsoft Office installed. Is there anything that can be converted without such restrictions? The required files contain only tables with minimal formatting. Images, diagrams and other complex elements are not required.

PS As I understand it, the format of this file is XML Spreadsheet 2003, ie. I need to convert it to XLSX

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor T2, 2020-09-21
@Viktor_T2

If you need under Linux, then:
https://pypi.org/project/pyoo/
LibreOffice or OpenOffice is still needed.
Please describe in more detail what the restrictions are.
Option 2: Parse the XML (manually) with something for xml,
some advise BeautifulSoup

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question