OneNote import (*.one / *.onepkg) doesn't import notes with title longer than about 240 chars

Operating system

Windows

Joplin version

3.7.21

Desktop version info

Joplin 3.7.21 (prod, win32)

Device: win32, AMD Ryzen 5 4500U with Radeon Graphics
Client ID: eefc0b08554b49738d60377331c0c24f
Sync Version: 3
Profile Version: 54
Keychain Supported: Yes
Alternative instance ID: -
Sync target: (None)
Editor: Rich Text

Revision: e41516e

Backup: 1.5.1
Diff view: 0.3.1
Freehand Drawing: 4.3.0

What issue do you have?

When importing OneNote 'pages' (=notes) via Joplin Import (i.e *.one and *.onepkg files) notes with title longer than about 240 chars aren't imported. The 240 chars aren't a 100% fixed number - it can vary a little bit.
For testing and documentation purposes I have created a new OneNote notebook and here created two 'pages' (notes). One of them has a title of 230 chars and the other a title of 260 chars.
When importing this notebook only the one with the tiltle of 230 chars is available.

The 'fun' part here is that the note with the 260 chars title is in the "C:\Users<user>.config\joplin-desktop\resources" folder and also shown in the 'top folder' after the import (the folder, where there is one single note with a list of all notes that are supposed to be imported), but not in the sub-folder of that folder (which contains the actual notes ).

I have this 'demo notebook' with these two notes ready for upload ( if requested so you can test this yourself). However it looks like I'm only able to upload screenshots and log files here in this new topic

Hi,

There are a few applications and utilities that convert Microsoft OneNote to Markdown. You might get better results converting to Markdown before importing directly into OneNote for those notes with really long titles but honestly I would shrink the title. It's not supposed to be part of the document. It's supposed to be a title. I generally keep my titles under 25 characters.

but honestly I would shrink the title. It's not supposed to be part of the document. It's supposed to be a title. I generally keep my titles under 25 characters.

Furthering this point, markdown exports from Joplin (if you use one of the options that uses the note title as the filename instead of the database id) can truncate very long titles in the filename due to filesystem restrictions on some operating systems so its good practice to keep them short for maximum portability

Thank you both for your comments. But since Joplin has a function to import from OneNote almost everybody who wants to migrate from OneNote to Joplin will use this tool.

Plus (I just tested that): It is possible to create a note in Joplin manually with a title of 260 chars, so the problem with the import from OneNote isn't caused by a max-title-length in Joplin

Also regarding the shrinking: If you have several 100 notes in OneNote (as I have) and there isn't any official tool to measure the length of the 'titles' of the notes to be imported I don't think that this is a general usable way to get around the problem:

  1. Folks migrating from OneNote to Joplin have to know about the problem in the first place - otherwise they will loose potentially very important notes

  2. One would have to import the OneNote notebook, look at the note in the top-folder of the imported notebook which lists all the notes Joplin was supposed to import. Then one would have to find all notes which have titles longer than about 240 chars, go back to OneNote, change all the notes with "too long" titles and then import the (now edited) notebook from Outlook to Joplin again.

Because that is much to cumbersome - and as mentioned not something everybody knows - I think the only solution is that the import function OneNote->Joplin has to be changed. Either to handle notes with long titles (perhaps truncate them if that's necessary (but it shouldn't be necessary because as mentioned a title of 260 chars is allowed in Joplin) or at least inform the user that "The following notes couldn't be imported because the title is more than nnn characters long"

Yeah didn't mean to come off as just "you're holding it wrong" :smiley: , its certainly worth a bug report (I agree that it should probably at least show a warning or something for any notes that couldn't be imported)

I am not home right now and don't have the names of the specific utilities handy. I know there is a plug-in for OneNote that exports directly to markdown. That plug-in might help you out if it supports long file names.

I'll give you the names of a couple of other utilities that you can try to see if they can successfully transfer from OneNote to markdown with long titles.

Joplin itself does not have a $255 character limit as far as I'm aware. So it's likely the Joplin OneNote importer that's having an issue.

The utilities and I will be posting here for you can handle 255 characters. You export to markdown and then import from markdown.

Hi @LeoW

I did as mentioned successfully created a note with a title of 260 chars, so yes, I agree that there is no Joplin limit regarding this.

But I don't think that 'other tools' are the correct solution since people naturally will use (and trust) the importer supplied by Joplin (and they should be able to trust that).

So I still think the only right path is to change the Joplin OneNote importer to either handle these notes with long titles correctly or at least inform the users about not importing some notes

The "other tools" are simply open source apps that create markdown files from onenote. I used one of them to export all of my Evernote notebooks so I could import them into Joplin. It went smoothly. The OneNote files are already downloaded from the internet and the utilities don't use the internet so there's no reason to believe that data is being stolen. You can disconnect your network if you like.

Besides, there's no way to know how long you are going to have to wait for this bug to be fixed in Joplin.

I specialize in finding more ways to skin the cat.

The only other option that I can think of is to use a different app to import the OneNote files to mark down and then import them into joplin.

In addition to Joplin I also subscribe to and use obsidian and it has the ability to import from Microsoft OneNote also via plugin and by default it creates individual folders with individual markdown files in them. It makes it a piece of cake to then import those folders into Joplin.

This way you're using an official hopefully trustworthy program to do the exporting.

Hi @LeoW

Thanks again. But my goal with creating this topic is not just to solve the problem I experienced, but to make the migration from OneNote to Joplin reliably and stable for everybody / all users wanting to do that migration by pointing out this problem.

I can solve (or rather circumvent) my own problem with the admittedly a bit quirky method I described earlier in this topic (Importing to Joplin, finding notes with too long titles (via a regular expression), changing those relatively few notes (25 notes in my case) in OneNote by shortening the titles of those notes to for example 235 chars and then re-import them to Joplin). As it is a one time thing and I guess it will take about 15-20 minutes I am quite happy with this method.

So it doesn't stop my migration even if the bug fix of the OneNote-import feature would take a long time - I just hope that it will be fixed so more people can migrate from OneNote to Joplin (without potentially loosing some of their notes).

But thanks for sharing your thoughts - others in my situation might prefer those methods so that's great

Hi @fla

It's great that you are interested in improving the product for everybody. I have a OneNote account but there's nothing in there worth importing.

From time to time there are people that join the Forum because they're having issues with OneNote. This is why I compiled utilities and options for those who run into trouble for many different reasons not just the length of the title.

Take care.

Info:

I have created an issue in github regarding this problem, so I think it is best to continue any thoughts and ideas in github from now on.

Link to the issue: