Importing large numbers from Excel to Access

Glenn_Suggs

New Member
Joined
Aug 9, 2012
Messages
13
I'm having with an import that involves number that are sixteen digits long. They appear to come in from Excel in scientific notation and all I need on the Access side is a 16-character string that represents the original number. (I need it to be text because that's the way it will be stored on a server side table) However, when I use Cstr(number), it retains the scientific notation format as something like 1.05000345E+15. How can I get the Scientific notation Excel number to convert to "1050003458749878"?

Thanks in advance,
Glenn
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Are you able to convert them to text in Excel? If so, then save the file as a .csv file and import the .csv file to Access. The "numbers" should then come over as text.
 
Upvote 0
If 16-digit numbers are stored in Excel as numbers, the least-significant digit has been irretrievably lost. Excel only stores numbers to 15-digit precision; larger numbers must be held as strings.
 
Upvote 0
Are you able to convert them to text in Excel? If so, then save the file as a .csv file and import the .csv file to Access. The "numbers" should then come over as text.

Thanks Alan. Unfortunately the file is sent from an outside source and when I do a "format cells" on the number column, then changing it to text still has the 1.0... e+15 type format. I think I've found a work around, though, so thanks for your time. ...Glenn
 
Upvote 0
Glenn;
If your file that is coming from an external source and it is a text based file, then you can import it directly into Access as text. Just a thought
 
Upvote 0
I think I to get the sender of the file, then, to convert the field to a string before sending it to me. Otherwise, I'm stuck with the fowled up number.
Thanks... Glenn
 
Upvote 0
Alan... That would be a great idea. However, in my situation, I work with what I get sometimes. (flying by the seat of my pants) If only the differing systems in this rather large company could talk to each other. I'd like to see some "data consolidation" taking place. Imagine that... Glenn
 
Upvote 0

Forum statistics

Threads
1,214,644
Messages
6,120,709
Members
448,983
Latest member
Joaquim_Baptista

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top