By psboegh on
Hi Drupal experts
Do anyone know any module or any clue how create a module that can import or export
.cvs or spreadsheet files from a Drupal database?
Best regard
Phillip
Comments
For Drupal 5
For Drupal 5 (not sure there'll be anything for 7.x yet, and neither of these seem to have official 6.x releases yet) you could try Node Import to import from CSV and Views Bonus Pack to export.
Not sure what you're asking
Not sure what you're asking exactly so this might not be what you want.
Here's an SQL query I used to import data from my old database into a table from a CSV file (this table and fields should already exist):
I imported first this way instead of directly into Drupal because I needed to run some cleanup on the old data first (after that I inserted the data into Drupal). If your data is already exactly ready to go into Drupal, you could import directly into the table of Drupal's, and replace the field names with all of those of the Drupal table you're importing into.
See: http://www.davidnewkerk.com/book/48
-- David
absolutecross.com
[new guide/lesson in progress: Creating a CCK and Views powered Drupal site - feedback welcome]