OneNote Gem Add-Ins

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

 

In phpMyAdmin, Create a View article_full for Export by SQL

 

Merged View article_full

The merged view contains:
  • Title
  • Body

Merged View article_full


phpMyAdmin Export the View as article_full.csv File

Choose when Export CSV:
Format: CSV
  • Columns separate with: ,
  • Columns enclosed with: “
  • Columns escaped with: ”
  • Put columns name in the first row: check
 
phpMyAdmin Export the View as article_full.csv File

Copy the Image Folder of the Article with the CSV File

Since 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.
 


Copy the Image Folder of the Article with the CSV File

Import CSV File into OneNote

In OneNote Batch:
  1. Click “Import” tab -> Import CSV
  2. Select a OneNote section in the notebook tree on the left to store the imported articles.
  3. Open the article_full.csv file.
  4. 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).
  5. Finally, click the "Start" button to start importing records one by one into OneNote.
 
Import CSV File into OneNote


View the Imported Results in OneNote

When the OneNote Batch import is complete, you can view the results in OneNote.
 

View the Imported Results in OneNote




Download OneNote Batch