Export Database Articles from phpMyAdmin as a CSV File and Import them into OneNote
In phpMyAdmin, Create a View article_full for Export by SQL
In general, the database will put the title and body of the article in 2 tables.
At first, you can merging the title and body to a view.
You can use the following SQL to create the view:
create view article_full (id, title, body) as select table_title.id, table_title.title, table_body.body from table_title, table_body where table_title.id = table_body.tid
Merged View article_fullThe merged view contains:
phpMyAdmin Export the View as article_full.csv FileChoose when Export CSV:
- Columns separate with: ,
- Columns enclosed with: “
- Columns escaped with: ”
- Put columns name in the first row: check
Copy the Image Folder of the Article with the CSV FileSince the article may contain images, you can copy the image folder with the CSV file.
For example, if the image in the article is /uploads/a.png, you can copy the image folder “uploads” to the same layer as article_full.csv. “uploads” is a subfolder.
Import CSV File into OneNoteIn OneNote Batch:
- Click “Import” tab -> Import CSV
- Select a OneNote section in the notebook tree on the left to store the imported articles.
- Open the article_full.csv file.
- It parses out how many columns are in the CSV and lists them. On the right, you can specify which column for Title (optional) and which column for Content (required).
- Finally, click the "Start" button to start importing records one by one into OneNote.