I managed to get node_import working on a CCK Tablefield. The attached file "tablefield.inc" should be placed in the 'supported/cck" folder.

The trick is to create your table as a serialized array in your CSV file. It is important to follow the cell col and row format, and to include three additional fields for the tablefield module to swallow. Here's an example of how to create that array:

$str = array();
$str["cell_0_0"] = "Name";
$str["cell_0_1"] = "Profession";
$str["cell_0_2"] = "Age";
$str["cell_1_0"] = "Arthur Abacus";
$str["cell_1_1"] = "Math Professor";
$str["cell_1_2"] = "48";
$str["cell_2_0"] = "Bob Brown";
$str["cell_2_1"] = "Accountant";
$str["cell_2_2"] = "36";
$str["cell_3_0"] = "Carol Cunningham";
$str["cell_3_1"] = "Product Designer";
$str["cell_3_2"] = "32";
$str["count_cols"] = "3";
$str["count_rows"] = "4";
$str["rebuild"] = "Rebuild Table";
$thestr = serialize($str);

In serialized format, this will look like:

a:15:{s:8:"cell_0_0";s:4:"Name";s:8:"cell_0_1";s:10:"Profession";s:8:"cell_0_2";s:3:"Age";s:8:"cell_1_0";s:13:"Arthur Abacus";s:8:"cell_1_1";s:14:"Math Professor";s:8:"cell_1_2";s:2:"48";s:8:"cell_2_0";s:9:"Bob Brown";s:8:"cell_2_1";s:10:"Accountant";s:8:"cell_2_2";s:2:"36";s:8:"cell_3_0";s:16:"Carol Cunningham";s:8:"cell_3_1";s:16:"Product Designer";s:8:"cell_3_2";s:2:"32";s:10:"count_cols";s:1:"3";s:10:"count_rows";s:1:"4";s:7:"rebuild";s:13:"Rebuild Table";}

And that's what you would put in your CSV file.

CommentFileSizeAuthor
tablefield_inc.zip517 bytesAs If
Support from Acquia helps fund testing for Drupal Acquia logo