importing numbers into text field

D

Dan D.

I have a web page that exports some data into a text file. Then I want to
import the text file into Excel. One of my columns of data (dealerid) is all
numbers but I want to import the data as text because there are some leading
zeroes on some of the data.

When I import the data I wind up with something like this "2.58882E+11".
I've tried formatting this column in the Excel sheet as text or general but
it still imports like above.

Preformatting the column works if I pull the data out of the database. I
didn't want to pull it straight from the database, though, because I have to
change some of the data depending on certain dealerids and I know how to
write the code faster in .asp better than I do in VBA in Excel.

Any idea how I can do this?

Thanks,
 
R

Rob

Dan said:
When I import the data I wind up with something like this "2.58882E+11".
I've tried formatting this column in the Excel sheet as text or general but
it still imports like above.


Thanks,

Looks like you need to increase the column width. There is not enough
room to show all the digits.

Rob
 
D

Dan D.

I tried that. I figured it out. If I create the original file with quotes
around the data in that column, then I can import it correctly.

Thanks
 
T

Tom Stiller

Dan D. said:
I have a web page that exports some data into a text file. Then I want to
import the text file into Excel. One of my columns of data (dealerid) is all
numbers but I want to import the data as text because there are some leading
zeroes on some of the data.

When I import the data I wind up with something like this "2.58882E+11".
I've tried formatting this column in the Excel sheet as text or general but
it still imports like above.

Preformatting the column works if I pull the data out of the database. I
didn't want to pull it straight from the database, though, because I have to
change some of the data depending on certain dealerids and I know how to
write the code faster in .asp better than I do in VBA in Excel.

When I import data from a text file, I use the Text Import Wizard which,
in step 3, permits me to choose the format of each column to be
imported. I live on the East Coast and it is useful to specify "Text"
for Zipcode data since most of ours have leading zeros.
 
D

Dan D.

I did that but even though I specified that column to be "text" unless the
quotes were around the data, it wouldn't work.
 
T

Tom Stiller

Dan D. said:
I did that but even though I specified that column to be "text" unless the
quotes were around the data, it wouldn't work.
I've never seen that behavior. I'm mow using Excel version 10.1.6
(040913) which is part of Microsoft Office X.
 
D

Dan D.

I'm using 10.2614.3501

Tom Stiller said:
I've never seen that behavior. I'm mow using Excel version 10.1.6
(040913) which is part of Microsoft Office X.

--
Tom Stiller

PGP fingerprint = 5108 DDB2 9761 EDE5 E7E3
7BDA 71ED 6496 99C0 C7CF
 
J

J Laroche

Use custom format 000000 (put as many zeroes as there are digits in
dealerid). This will show 001234 in the cell, but actual data will still be
1234. Is that OK for you?

JL
Mac OS X 10.3.7, Office v.X 10.1.6




Dan D. wrote on 2005/01/07 14:31:
I'm using 10.2614.3501

JL
Mac OS X 10.3.7, Office v.X 10.1.6
 
P

Paul Berkowitz

That looks like an Excel 2002 (Windows) version number, not an Excel X (Mac)
version.

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.
 
D

Dan D.

That's correct.

Paul Berkowitz said:
That looks like an Excel 2002 (Windows) version number, not an Excel X (Mac)
version.

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.
 
D

Dan D.

That worked. Thanks.

J Laroche said:
Use custom format 000000 (put as many zeroes as there are digits in
dealerid). This will show 001234 in the cell, but actual data will still be
1234. Is that OK for you?

JL
Mac OS X 10.3.7, Office v.X 10.1.6




Dan D. wrote on 2005/01/07 14:31:


JL
Mac OS X 10.3.7, Office v.X 10.1.6
 

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