Using 0#####;0;# To import

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello.
I am using Access 2000 and I am trying to import an Excel Spreadsheet that
has a column with the formatting of 0#####;0;# (Example 012345)
When I import the spreadsheet into Access, Access takes away the pre leading
zero leaving it with 12345. I need the pre leading zero in the Access
database.
How can I mediate this problem?

Thanks.
Iram/mcp
 
One of two fixes (needed because Jet in ACCESS sees your data as a number,
not as a text string) to do to your data in the EXCEL sheet:

1) Put an apostrophe in front of the value in each cell. That tells Jet that
the data are text.

2) Put non-numeric value in the first row (or many rows) of the sheet (e.g.,
Testing) so that Jet sees some non-numeric values and thus treats the data
as text.

Or you can import the data into a temporary table in ACCESS, letting the
leading zero(es) be lost, then run an append query to copy the data into a
permanent table (where the field to get the "numbers" is set up as a Text
field) using a calculated field for the "number" values to insert the
leading zero(es) that you need.
 
Hi,
try to put a ' in front of all the values! You can do this programmatically
within excel if you want to.
This way access will import everything correctly.
HTH
Good luck
 
Back
Top