Import CSV - with checkboxes

By Toledoh - October 20, 2014

Hi Guys,

I've got an excel spreadsheet, with a header row and then many rows (records)

Each row has a number of columns, which are "features" that each record has. 

This produces a csv: ie.

Item, feature1, feature2, feature3, feature4

recordA,1,,,,

recordB,1,1,,,

recordC,,1,1,1,

etc

How can I import that (using csv plugin) to either;

1. Import and have each feature as a checkbox field - where 1 is "checked", or

2. Import and have a list-field - with multi-select items made up of the features.

When I import, I can get the records in as text-fields.  When I go to change them to check-boxes, I get the error: 

There was an error changing the MySQL Column, the error was:

Incorrect integer value: '' for column 'rest_rooms_and_meeting_rooms' at row 2

Cheers,

Tim (toledoh.com.au)

Hi Tim,

Would it be possible to format the data in the Excel file so that instead of having a blank value for unchecked items, it is zero instead?

I think the reason you can't import the data is that a check box must have a value of 1 or 0 stored in every field before it can be converted to a check box.

Thanks,

Greg

Greg Thomas







PHP Programmer - interactivetools.com