NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: olu on October 06, 2013, 10:55:57 PM
-
Please what is the best way to import a csv file and write it into my database. I have a contact list in csv format that I need to import into my application contact file (backend sql). I was going to use office inside, but only got version 2 and the server has not got office installed on it. Will office inside work without office on the server
-
Hi Olu,
there are lots of ways to do this - Office Inside is one, but might be overkill for a CSV file.
a) Declare a table in your dictionary - use Basic driver, and then just loop through this table (perhaps in a process procedure) adding the records to your other table?
b) Use stringTheory =
loadFile
split on CRLF
for each line
split again on , (using a second st object)
copy fields into your record and save new record
Personally I'd use b) - especially if this was a one-time import (because then no dict structure required).
cheers
Bruce
-
Thanks bruce. Not only was I able to use your advice (b) to get an import to work but also was able to use the stringtheory to do export as well. Thanks.