Hi

I am struggling to import data from Department(CSV Candidate file).

The problem is I have to import these CSV files:

First Row = ClientName: Facebook
Second Row = Name | Age | Location -> Header
Third Row = Mark | 33 | America -> Data records
Fourth Row = Sheryl | 38 | America -> Data records

A table with the CSV filename has to be created and then the records inserted.

Everytime an upload happens, a PHP script has to run to check for the table's existence. If it exists, the records are inserted. If it does not exist, the table is created and then the records are inserted.

The filename is NOT inserted into the table.

Each client has a different table created for their records.

Once more, the tables are created the first time the CSV is uploaded.

How can we implement this in Drupal 7 either contributed modules or custom modules for the above functionality ??

Your help will be greatly appreciated...

Comments

sprite’s picture

You should be importing your external data by creating nodes from it, not a generic "table" that isn't integrated with the rest of Drupal.

spritefully yours
Technical assistance provided to the Drupal community on my own time ...
Thank yous appreciated ...

yelvington’s picture

See https://www.drupal.org/project/data for managing non-node data. See https://www.drupal.org/project/feeds for importing CSV (and other formats) into either data tables, or nodes. Either way, https://www.drupal.org/project/views manages output.