scotthutchings
Registered User.
- Local time
- Today, 08:39
- Joined
- Mar 26, 2010
- Messages
- 96
I have a client that uses a software application that exports the data to a csv. The problem is that the file places the first line of data in the first row that also contains the column names. Here is an example:
In every file, the last column name is "No Products found for selected project". The first line of data, then begins after the next comma. How can I import the first line of data? Here is my current code:
Is there a way that I can have my Access application modify the text file before importing it or is there another way to import it that might work better?
Thanks for your help.
Scott
PHP:
"Product Summary","200009 : SCA La Veta ASC","Mfg","Product Description","List Price","Unit Cost","Sell Price","Qty","List Price","Extended","Extended","Cost","Extended","Sell Price","No Products found for selected project","IV","Hinges 5BB1 4 1/2 x 4 1/2 HT 626","36.70","13.76","20.95","144","5284.80","1981.44","3016.80","Openings: 101(3), 105(3), 106(3), 106A(3), 106B(3), 106C(3), 107(3), 107A(3), 107B(3), 107D(3), 107E(3), 108(3), 109(6), 110(3), 112(3), 113(3), 114(3), 115(3), 116(3), 121(3), 122(3), 125(3), 131(3), 132(3), 145(3), 145A(3), 146(3), 146A(3), 148(3), 149(3), 150(3), 152(3), 153(3), 154(3), 155(3), 155A(3), 155B(3), 156(3), 158(3), 159(3), 160(3), 161(6), 162(3), 163(3), 164(3), 165(3)","September 17, 2010 3:01 pm","Page -1 of 1"
"IV","Hinges 5BB1SC 4 1/2 HT 652","56.80","21.30","32.43","6","340.80","127.80","194.58","Openings: 129A(6)","September 17, 2010 3:01 pm","Page -1 of 1"
"IV","Set Auto Flush Bolts FB51P US32D","151.20","56.70","86.33","2","302.40","113.40","172.66","Openings: 109, 161","September 17, 2010 3:01 pm","Page -1 of 1"
"SC","Lockset ND50PD SPA 626","428.00","160.50","244.36","7","2996.00","1123.50","1710.52","Openings: 105, 112, 114, 115, 116, 160, 164","September 17, 2010 3:01 pm","Page -1 of 1"
In every file, the last column name is "No Products found for selected project". The first line of data, then begins after the next comma. How can I import the first line of data? Here is my current code:
Code:
DoCmd.TransferText acImportDelim, ImportSpec, "Project Material", strFileName, yes
Is there a way that I can have my Access application modify the text file before importing it or is there another way to import it that might work better?
Thanks for your help.
Scott