Working w/ CSV File

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using Visual CE which Exports an ASCII File like this...

Store,@var(1),LastInsp,@var(0),Question,TheQues,Guidance,Answer,Comment,SchCorr,CorrDate,CActions,OtherReason
050234,"050234",2006-08-24 00:00:00,2006-08-24 00:00:00,"154","Is the
service center maintaining copies of all Ashland hotwork permits issued for
the site for a period of one year?","Guidance: If a hotwork permit is issued
for a facility, that facility is required to maintain both the pink and
yellow copies of the permit in their Responsible Care Compliance Manual for a
period of one (1) year.","CTOA","Other",2006-08-29 00:00:00,2006-08-30
00:00:00,"hot work permit found",""

I have to rename the File w/ a .csv extension which I'll have to do by code.
Using an Import Spec also gets messed up because soon as it sees...
"Guidance: If a hotwork permit is issued for a facility, that facility is
required to maintain both the pink and yellow copies of the permit in their
Responsible Care Compliance Manual for a period of one (1) year."...even
though Double Quotes are
around the string, the comma "separates" the string and places the next word
"that"
in the next field.

I still have another way to try to import the data without using an Import
Specifictaion.

Looking for ideas on how to best get this data in...including deleting the
first row of Field names.

TIA - Bob
 
are you sure during import you not "checked" the delimiter box???

In the wizard, you check

[x] first name contains name

and, for the text qualifier, choose the "

If you do the above, then the sample data you posted will import ok.
However, the date/time fields were failing for some reason (so, import those
as text first...and convert them later....


You can write your own code to import the data, but you should try the
wizard first...

I just cut and pasted your data into a text document, and I had not problem
importing the data....

So, make sure you check both "first name contains fields", and also make
sure set the text qualifier to "
 
Albert - It will work manually...Just starting to test running in w/ code.

Thank you - Bob
 
Getting "unable to append data" from...
R = "C:\CEFiles\" & cboFileCE
DoCmd.TransferText acImportDelim, "AFromCE", "FromCE", _
R, True


Bob Barnes said:
Albert - It will work manually...Just starting to test running in w/ code.

Thank you - Bob

Albert D. Kallal said:
are you sure during import you not "checked" the delimiter box???

In the wizard, you check

[x] first name contains name

and, for the text qualifier, choose the "

If you do the above, then the sample data you posted will import ok.
However, the date/time fields were failing for some reason (so, import those
as text first...and convert them later....


You can write your own code to import the data, but you should try the
wizard first...

I just cut and pasted your data into a text document, and I had not problem
importing the data....

So, make sure you check both "first name contains fields", and also make
sure set the text qualifier to "
 
Back
Top