|
|
Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
I am importing a text file and the field values are enclosed in "" (quotation) marks. Is there any way to have Access recognize the quotations, ignore them and import just the field values?
Thanks for your help.
|
|
It depends on how you are doing the import. If you are doing it manually, one of the options in the transfer wizard is to define delimiters for text fields. If you are doing it from VBA using Transfer text, then you will want to do the import once using the wizard and set up an Import Spec that will include that option. To set up a Spec, when you get the wizard dialog, click on Advanced and set up your options the way you need them. Then, click on Save As and give the Spec a name. You can identify the spec name in the TransferText method.
"JJ" wrote:
[Quoted Text] > I am importing a text file and the field values are enclosed in "" > (quotation) marks. Is there any way to have Access recognize the quotations, > ignore them and import just the field values? > > Thanks for your help.
|
|
I am importing them manually.
There are several fields in the file I am importing, and the fields are delimitted by a comma. So in the wizard, I have already selected the delimitter as comma. Not sure if I can have 2nd delimitter. Here is just and example of the file lay out
"text1","text2","text3"
When I import this in access with delimeter set to comma, I get the value "text1" in the first field. I want it to be just text1 with the quotes.
...Jose
"Klatuu" wrote:
[Quoted Text] > It depends on how you are doing the import. If you are doing it manually, > one of the options in the transfer wizard is to define delimiters for text > fields. If you are doing it from VBA using Transfer text, then you will want > to do the import once using the wizard and set up an Import Spec that will > include that option. To set up a Spec, when you get the wizard dialog, click > on Advanced and set up your options the way you need them. Then, click on > Save As and give the Spec a name. You can identify the spec name in the > TransferText method. > > "JJ" wrote: > > > I am importing a text file and the field values are enclosed in "" > > (quotation) marks. Is there any way to have Access recognize the quotations, > > ignore them and import just the field values? > > > > Thanks for your help.
|
|
Just below the combo where you selected the comma as Field Delimiter, there is a combo called Text Qualifier. That is what you want.
"JJ" wrote:
[Quoted Text] > I am importing them manually. > > There are several fields in the file I am importing, and the fields are > delimitted by a comma. So in the wizard, I have already selected the > delimitter as comma. Not sure if I can have 2nd delimitter. Here is just and > example of the file lay out > > "text1","text2","text3" > > When I import this in access with delimeter set to comma, I get the value > "text1" in the first field. I want it to be just text1 with the quotes. > > ..Jose > > > "Klatuu" wrote: > > > It depends on how you are doing the import. If you are doing it manually, > > one of the options in the transfer wizard is to define delimiters for text > > fields. If you are doing it from VBA using Transfer text, then you will want > > to do the import once using the wizard and set up an Import Spec that will > > include that option. To set up a Spec, when you get the wizard dialog, click > > on Advanced and set up your options the way you need them. Then, click on > > Save As and give the Spec a name. You can identify the spec name in the > > TransferText method. > > > > "JJ" wrote: > > > > > I am importing a text file and the field values are enclosed in "" > > > (quotation) marks. Is there any way to have Access recognize the quotations, > > > ignore them and import just the field values? > > > > > > Thanks for your help.
|
|
It worked perfectly.
Thank you for your help.
"Klatuu" wrote:
[Quoted Text] > Just below the combo where you selected the comma as Field Delimiter, there > is a combo called Text Qualifier. That is what you want. > > "JJ" wrote: > > > I am importing them manually. > > > > There are several fields in the file I am importing, and the fields are > > delimitted by a comma. So in the wizard, I have already selected the > > delimitter as comma. Not sure if I can have 2nd delimitter. Here is just and > > example of the file lay out > > > > "text1","text2","text3" > > > > When I import this in access with delimeter set to comma, I get the value > > "text1" in the first field. I want it to be just text1 with the quotes. > > > > ..Jose > > > > > > "Klatuu" wrote: > > > > > It depends on how you are doing the import. If you are doing it manually, > > > one of the options in the transfer wizard is to define delimiters for text > > > fields. If you are doing it from VBA using Transfer text, then you will want > > > to do the import once using the wizard and set up an Import Spec that will > > > include that option. To set up a Spec, when you get the wizard dialog, click > > > on Advanced and set up your options the way you need them. Then, click on > > > Save As and give the Spec a name. You can identify the spec name in the > > > TransferText method. > > > > > > "JJ" wrote: > > > > > > > I am importing a text file and the field values are enclosed in "" > > > > (quotation) marks. Is there any way to have Access recognize the quotations, > > > > ignore them and import just the field values? > > > > > > > > Thanks for your help.
|
|
|