
Some time ago, shortly after publishing a guide on Markdown , I looked into whether LibreOffice could be used to create those types of documents. I found nothing, unless answers like "Why do you want to do that?" count. The idea was to create a document with a word processor like Word or Writer and then save it in .md format, but as I said, I found nothing. Recently, Microsoft released a tool for something similar, called MarkItDown.
MarkItDown is a Python library that can be installed on your system—not on Linux since Python 3.12—or in a virtual environment (env). After installation, basic or raw usage would require writing a few lines of Python code, which you'll find below. But that's not the only way to use it.
MarkItDown using Python
The API is this simple:
from markitdown import MarkItDown markitdown = MarkItDown() result = markitdown.convert("test.xlsx") print(result.text_content)
From the above, the first line imports the library; the second creates a compatible object; the third performs the conversion—to a file that in the example is called text.xlsx—and the fourth prints the result to the console. Furthermore, as explained on its GitHub page , it can be made compatible with LLM as ChatGPT , all of this depending on the user's preference and technical knowledge.
If coding isn't your thing, a developer named Matt Palmer has created a website to make things easier. Although it's in English, it's very simple to use. At the bottom of the box, it lists the supported file types: PDF, PPTX, DOCX, XLSX, Images, Audio, HTML, and text files. All you have to do is drag a file into the box and wait for the magic to happen, as you can see in the header screenshot.
At the time of writing this article there is a problem downloading the file, which displays an error message instead of the text. It is possible, something I have not verified, that I am seeing this because I created the file from Linux, LibreOffice or both, but I see this error when downloading the file. The conversion is done fine, and you can always copy the plain text it generates, paste it into a text file and save it with a .md extension.
To visualize it, on Linux we can use tools such as Okular, Visual Studio Code or any program from this list , among others.
To consider
Although the tool was created by Microsoft, not everything will always work out well. To get the best results, you need to use the right options. For example, to put a # Titular o ## TÃtulo 2, you have to select that in the Word or Writer options. The same goes for ordered or unordered lists, links, images… If instead of using the correct options, we select a text and put a bold and larger font, Markdown does not work like that, and we may get mixed results. For more information about supported tags, we refer you to the link that you will find in the first paragraph of this note.
Now, it is an official tool from Microsoft, and it may be the best option to convert supported files to Markdown.
Table of Contents