Problems when saving worksheet into tab-delimited text file

T

Tom

I save a spreadsheet into a tab-delimited text file for later import into an
Access database.

One column contains text strings in which "comma values" can be found.

Once save to the text file, those records that have commas in the Excel
cells now contain double quotes (".....") at the beginning and end of the
text string.

As a result, during the data import into Access (and later comparison), the
records are considered new and add records to tables.

During testing procedures, I realized that replacing the comma with a
semicolon would not add the double quotes when saving to the text file (but
a semicolon simply doesn't "look right" in the middle of a sentence string).

So, my questions are:
- Why does the "error" (double quotes) happen with a comma, but not w/ a
semicolon?
- Is there a way around this (I prefer to use the comma instead of the
semicolon)? The cell data type is "General" and "Text".

Thanks,
Tom





I am saving a spreadsheet
 
D

Dave Peterson

First, I don't use Access...

But I bet excel is looking at your windows regional settings to find your list
separator.

Windows start button
settings
control panel
regional settings applet
Number Tab

Is how I'd find this in win98.

You could experiment by changing this and seeing if that helped.
(It is a windows setting and can affect other progams.)

But if I really wanted control of how things got exported, I steal some code
from one of these:

Chip Pearson's:
http://www.cpearson.com/excel/imptext.htm

Earl Kiosterud's:
http://www.tushar-mehta.com/
Look for Text Write in the left hand frame.

J.E. McGimpsey's:
http://www.mcgimpsey.com/excel/textfiles.html

(You may want to try Earl's. It may be sufficient as is.)
 
T

Tom

Dave:

Yep... you're right, this did the "trick".

Any idea what programs might be negatively affected by this change?

--
Thanks,
Tom


Dave Peterson said:
First, I don't use Access...

But I bet excel is looking at your windows regional settings to find your list
separator.

Windows start button
settings
control panel
regional settings applet
Number Tab

Is how I'd find this in win98.

You could experiment by changing this and seeing if that helped.
(It is a windows setting and can affect other progams.)

But if I really wanted control of how things got exported, I steal some code
from one of these:

Chip Pearson's:
http://www.cpearson.com/excel/imptext.htm

Earl Kiosterud's:
http://www.tushar-mehta.com/
Look for Text Write in the left hand frame.

J.E. McGimpsey's:
http://www.mcgimpsey.com/excel/textfiles.html

(You may want to try Earl's. It may be sufficient as is.)
 
D

Dave Peterson

No, I don't. But if I need to toggle this, I change it, do what I need to do,
then change it back.

(I know excel respects it--and that could cause trouble when you share text
(.csv) files with others.)


Dave:

Yep... you're right, this did the "trick".

Any idea what programs might be negatively affected by this change?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top