Thursday, March 3, 2011

How to import data from CSV text file

Sample data


> Sample spreadsheet 1
> Sample spreadsheet 2

Instruction


A CSV file is a specially formatted plain text file, which stores spreadsheet or basic database-style information in a very simple format, with one record on each line, and each field within that record separated by a comma.

Most PC based spreadsheet program can create CSV file and we will use Microsoft Excel for this example.

Step 1) Excel

Go to Excel and open a spreadsheet.


Step 2) Header

Create header line in the first row with the titles of each column. Available column titles are as follows.

itemTitle
itemNote

itemCategory
itemLocation
itemTag
itemDateTime

itemPrice1
itemQty
itemPrice2

itemTitle1 ...Title field in Product description section
itemDesc
itemCustomBarcode
itemASIN ...........Amazon ASIN code
itemUPC
itemISBN
itemEAN
itemModel
itemSerial



Step 3) Rows

Enter the the inventory items from the second row.






Each row will become one inventory item and Text in each columns are imported to corresponding fields.

When entering the data, please make sure about the following data format requirements.

1. Date format
All the values in "itemDateTime" should be in "YYYY-MM-DD_HH:MM" 24-hour format.

(i.e. 2011-12-31_23:59, 2012-02-28_10:30, ..)

2. Match the tag
The value in "itemCategory", "itemLocation" and "itemTag" columns should match to the existing label data in Barcode Express. Otherwise, new category, location or tag will be created for the entry.

If the "itemCategory" column is left blank, the entry will be imported into "Imported" category by default.

Step 4) Save

Save the spreadsheet.


When saving file, make sure to save the spreadsheet as "csv" type. For this, use the "CSV (Comma delimited) (*.csv)" option in "Save as Type". Flashcards Buddy cannot understand the default "xls" type.


Step 5) SD card

Now, you are done with Excel. Copy the file to SD card and go to Barcode Express


Step 6) Import

In import screen, you will see the list of folders and files in SD card. Folders have yellow folder icon in left, and CSV files has white import icon in right side.


Press the csv file you just created in Excel. Then you will see the list of rows you have created.


Extra) Language encoding problem

If your csv file includes non-English characters such as Asian two-byte character, you will have display problem.

This problem is mostly caused by the language-encoding difference between Windows Excel and Android OS. If you are familiar with encoding, you may solve the problem using third party notepad application such as NotePad++ or EditPlus. These programs can convert "ASCII" in Excel CSV to "UTF-8" which is used by android OS. Otherwise, we recommend "Import from Google Docs" option instead of CSV import.