Skip to Content

Importing data from a CSV file

Estimated Reading Time: 3 Minutes

This section allows you to import articles in bulk from CSV file.  By default, CSV import page is displayed. CSV stands for Comma Separated Values, sometimes also called as Comma Delimited is a specially formatted plain text file which stores spreadsheet or basic database information in a very simple format, with one record on each line, and each field within that record separated by a comma.

Expand "Tools" in left navigation bar and click on "Import Data" to import CSV data.

Import using CSV file is a two step process. You can move to the second stage after successful completion of the first stage. At stage one, specify different import options as shown in the figure below.

  • Article Type: If Public is checked, the articles are imported into the public categories and if Private is marked, the articles are imported into the private categories.
  • Import Into: Select the category into which the article(s) should be imported. Please take into consideration that in ML editions of software, categories of the language selected in language drop-down are displayed only.
  • Import As: Select the status (Approved, Pending, Disapproved, Draft, Featured) where the article is to be imported.
  • Delimiter: PHPKB allows three types of separation among fields in CSV files: Comma (,), Pipe Symbol (|), tab (\t).
  • If the first line of the imported file contains field names, then check First Line Contains Field Names option.

  • Import From a File: If this option is checked, you can use CSV file stored in your system for a large scale import. The CSV file you use should contain following details:
    1. Each record should have two mandatory fields - Title and Content. Keywords, Summary, Description are optional fields.
    2. Fields should not be in same order.
    3. If CSV file contains filed headers, they should be in the first line of the file.
    4. Only text/plain or text/CSV or text/comma-separated-values or application/csv or application/excel or application/vnd.ms-excel or application/vnd.msexcel files may be uploaded.
    5. If your text/plain or text/csv file field contains double quotes then you must preface these interior quotes with a back slash (\) in order to differentiate them from quotes defining the start and end of field contents.
  • Click "Choose File" to select a file from your system to import.
  • Import Using Copy/Paste: If this option is checked, you can write or copy/paste the comma separated contents directly into the text box area below this option (displayed once you check Import using copy/paste option).
  • Click "Next" button to continue to next step.

The second step allows you to synchronize fields in CSV file with the article fields of the knowledge base.

  • CSV fields column displays fields found in CSV file and Map into Fields column has select drop-downs with options article title, article content, article keywords and article summary in each drop-down. You need to choose the relevant option from the drop-down that matches with the specified field of your CSV file. For example, the CSV field title is the name of the article so Article Title option should be selected in the corresponding select drop-down.
  • Note that Title and content fields are mandatory to be mapped in order to proceed with CSV process.
  • If you do not synchronize other fields of your CSV, fields will simply be ignored and it will not be stored in the database.
  • After mapping the fields click on "Import Now" button to import the articles. Articles Imported Status screen will be displayed as shown below:

  • This screen displays Total Records, Imported articles and Errors (if any with their full description).
  • You can click the icon displayed with the number of imported articles to view/manage them in Manage Articles section.
  • Applicable To: Standard Edition, Standard (Multi-Language) Edition, Enterprise Edition (MySQL), Enterprise Multi-Language Edition (MySQL), Enterprise Edition (SQL Server), Enterprise Multi-Language Edition (SQL Server)
Importing data from a CSV file
  • COMMENT