import csv and parse?

D

Dave

Hi everyone,

You've been a great help to me in the past. I hope someone can here
too.

I have a database to which I would like to import data from a csv
file. Each csv file has about 30 different fields separated by commas.
I want to add only two of those fields to my database. How do I do
this? Or does somebody know of a tutorial that might help?

Thanks,

Dave B
 
P

Pieter Wijnen

You can make an import spec & skip the fields that way - or - import into a
temp table & run an Append query on that

Pieter
 
A

Albert D. Kallal

the import wizard lets you exclude columns during a import....

file->get external data->import

when the wizard starts, select comma, delimiters etc....

Then hit the advanced button..you see a check mark to include only the
fields you want...

So, once you get this working via a manual process, then you can save this
'advanced' setting, and make the whole process a one button click affair
(note the "save-as" buttion in the advanced setting, this is how you "save"
your import spec..and once done, you can use this with the transfertext
command to automate the import).

So, take this one step at a time, save the import spec, and get the text
import working the way you want...
 
D

Dave

the import wizard lets you exclude columns during a import....

file->get external data->import

when the wizard starts, select comma, delimiters etc....

Then hit the advanced button..you see a check mark to include only the
fields you want...

So, once you get this working via a manual process, then you can save this
'advanced' setting, and make the whole process a one button click affair
(note the "save-as" buttion in the advanced setting, this is how you "save"
your import spec..and once done, you can use this with the transfertext
command to automate the import).

So, take this one step at a time, save the import spec, and get the text
import working the way you want...

Thanks Albert, you're always so helpful.

How about if it is an excel spreadsheet instead of a csv file. Is
there a way to automate the import of that? I found out that the
instrument output that I'm interested in importing to my database,
exports as a excel file, not text unfortunately.

Thanks,

Dave B
 
P

Pieter Wijnen

I think you have to use a temporary table (or link to the spreadsheet)
& import to the real table using a Query

Pieter
 
Top