alxnbl/onenote-md-exporter

C#

ConsoleApp to export OneNote notebooks to Markdown formats

onenotejoplinevernotemarkdownpandocobsidian
Star Growth
Stars
1.6k
Forks
143
Weekly Growth
+1
Issues
15
5001k1.5k
Jan 2021Nov 2022Oct 2024Sep 2026
README

OneNote Md Exporter is a console application running on Windows that exports your OneNote notebooks in different markdown formats.

This tool is usefull to :

  • evaluate or migrate to an alternative Knowledge Management Software like Joplin, Obsidian or other softwares based on Markdown format
  • backup your OneNote Notebooks in an interoperable and open file format

The tool is easy to install and use, and can produce better results than other OneNote export methods.

Requirements

  • Windows >=10
  • OneNote >= 2013, OneNote for Windows (from the Windows store) is not supported
  • Word >= 2013

Getting started

  1. Download the last release of OneNoteMdExporter from the Releases page
  2. Extract the content of the Zip archive
  3. Launch OneNote and be sure that notebooks to export are loaded
  4. Export your notebooks :
    • Start OneNoteMdExporter.exe
    • Select the Notebook to export
    • Select the export format
    • [Optional] Edit advanced settings
    • Go take a coffee ☕
    • At the end of the export the export folder is open in Windows file explorer

Command line is supported, run OneNoteMdExporter.exe --help for instructions.

Export formats supported

Markdown

  • Sections and section groups are exported as a folder hierarchy containing pages :
    Notebook1
    - Section1
      - Section1.1
        - Page1.md
        - Page2.md
    - Section2
    
  • Settings
    • ProcessingOfPageHierarchy : page hierarchy as parent folder of md file (ParentPage\Child Page.md ; default value) or as md file prefix (ParentPage_ChildPage.md)
    • ResourceFolderLocation : images and file attachments can be stored in a single folder at the root of the export or in a folder next to each md file
    • AddFrontMatterHeader : add a YAML header containing page metadata at the beginning of each md file
      ---
      title: Page title
      updated: 2021-11-11 14:55:00Z
      created: 2021-11-11 14:54:43Z
      ---
      Page content
      
    • PanDocMarkdownFormat : choose the markdown syntax to use among those supported by pandoc. Use GitHub flavor by default.
    • OneNoteLinksHandling :
      • KeepOriginal: Keep the original OneNote link format (onenote://...)
      • ConvertToMarkdown: Convert OneNote links to markdown format "text"
      • ConvertToWikilink (default): Convert OneNote links to wikilink format "[[Page Title|Display Text]]"
      • Remove: Remove all OneNote links
    • UseHtmlStyling : disable if your markdown editor do not supports HTML.

Joplin Raw Directory

Features and limitations

Export format: Markdown Joplin
Hierarchy of sections ✅ Folder hierarchy ✅ Notebook hierarchy
Page ordering inside a section 🔴 Ordering based on md filename ✅ Order preserved
Page hierarchy ✅ Page prefix or folder prefix
Notebook internal link (onenote://) ✅ * ✅ *

* Cross-notebooks links and links to sections are removed



All formats :
Attachment
Image
Simple table ✅ as markdown
Complex table ✅ as HTML*
Folded paragraphs
Font color ✅ as HTML*
Background color ✅ as HTML*
Text tags (task, star...) ✅ Converted into emoticons
Drawing 🟠 Flattened as image
Password protected section 🟠 Lost unless unlocked before export
Handwriting 🔴 Lost

* Support of the feature requires a mardown editor that supports HTML (like Joplin and Obsidian)

FAQ

  • An error Unhandled exception. System.Runtime.InteropServices.COMException occurs after starting the tool

    • This error in usually caused by a problem specific to your computer installation. Consider :
      • Uninstall and reinstall Office
      • Export notebook from an other computer : export your notebook, import it on an other computer and run OneNoteMdExporter
  • Some of my images are lost / broken during export

    • Try to enable the option Download all files and images from File -> Options -> Sync. Force synchronisation of your notebook and try again the export.

Technical characteristics

  • DotNet 10 self-contained console application
  • Export pages as DocX files and translate them in Markdown using PanDoc
  • Offline : no dependency to Microsoft cloud
  • Rely on OneNote and Word apps (based on Interop APIs)
  • Pre-processing stage of OneNote page XML structure
  • Post-processing stage based on Regex to fix formatting issues

Licence

Released under the GPL, version 3.

This software carries no warranty of any kind. Some data can be lost during the export process. I recommend to review your notes after export and keep a backup of your OneNote notebooks just in case.

Pandoc licence terms

OneNote Md Exporter uses PanDoc universal markup converter.

Pandoc is available at https://github.com/jgm/pandoc

Pandoc is released under the following licence terms, full licence details can be found on the pandoc site.

© 2006-2021 John MacFarlane (jgm@berkeley.edu). Released under the GPL, version 2 or greater. This software carries no warranty of any kind.

Build sources

Contribute

Bugs and feature requests can be reported under: https://github.com/alxnbl/onenote-md-exporter/issues.

You can contribute by adding an new feature or add translations. See this page for more details.

Support

I developed this tool on a voluntary basis, but if you like my work you can buy me a ☕.

Related repositories
OdysseusYuan/LKY_OfficeTools

一键自动化 下载、安装、激活 Office 的利器。

C#appGNU General Public License v3.0kmsmicrosoft
foxmail.com
12.6k1.2k
webclipper/web-clipper

For Notion,OneNote,Bear,Yuque,Joplin。Clip anything to anywhere

TypeScriptnpmappOtherchrome-extensionweb-clipper
clipper.website
6.8k658
elvirbrk/NoteHighlight2016

Source code syntax highlighting for OneNote 2016 and OneNote for O365 . NoteHighlight 2013 port for OneNote 2016 (32-bit and 64-bit)

C#appGNU General Public License v2.0onenoteaddin
3.9k395
OdysseusYuan/Mocreak

Automatically downloads, installs, and deploys genuine Windows and Office with one click. This tool is completely free, ad-free, green, non-toxic, simple, efficient and safe.

appaccessemail
mocreak.com
3.5k234
stevencohn/OneMore

A OneNote add-in with simple, yet powerful and useful features

C#appMozilla Public License 2.0onenoteaddin
3.4k257
gamosoft/NoteDiscovery

Your Self-Hosted Knowledge Base

JavaScriptnpmMIT Licensedockerevernote
notediscovery.com
2.8k233
patrikx3/onenote

📚 Linux Electron Onenote - A Linux compatible version of OneNote

JavaScriptnpmappMIT Licenselinuxonenote
corifeus.com/onenote/
2.1k111
LinwoodDev/Butterfly

🎨 Powerful, minimalistic, cross-platform, opensource note-taking app

DartappGNU Affero General Public License v3.0flutterapp
butterfly.linwood.dev
2k147
vgrem/office365-rest-python-client

Microsoft 365 & Microsoft Graph Library for Python

PythonPyPIlibraryMIT Licenseoffice365sdk-python
1.7k369
vgrem/Office365-REST-Python-Client

Microsoft 365 & Microsoft Graph Library for Python

PythonPyPIlibraryMIT Licenseoffice365sdk-python
1.7k369
obsidianmd/obsidian-importer

Convert your data to Markdown files you can use in Obsidian. Works with Apple Notes, OneNote, Evernote, Notion, Google Keep, and many other formats.

TypeScriptnpmMIT Licenseobsidianobsidian-plugin
help.obsidian.md/import
1.6k253
tllovesxs/wandao

万能导:多平台知识库 Markdown 全项目一键导入导出工具(导入导出效果最好),用自动化代替手动复制粘贴(有道云,飞书,语雀,阿里云知识库,知识星球,印象笔记,ima,onenote,为知笔记,csdn,知乎,微信公众号导出导入).(可保留目录结构,图片,项目格式) 关键词:微信公众号导出,语雀导出导入,飞书导出导入,ima导出导入.阿里云文档导出,印象笔记导出导入,有道云导出,知识星球导出,为知笔记导出,onenote导出,钉钉文档,息流导出,Obsidian 导出,wps导出,知乎导出

PythonPyPIappGNU Affero General Public License v3.0backupdata-portability
linux.do/t/topic/2452125
1.1k129