Setting defaults opening .csv files

M

MatGyver

I have a .csv file that is download everyday from our automated credit
card processing vender. The credit card field is 16 digits. When I
open the file in Excel, I get a decimal number with an E+15 attached
to it.

For Example: 4.12345E+15

When I convert the cell to a number, I get sixteen digits, but on
every single cell in the column, the last number is changed to a 0. If
I look at the file in notepad, the 16 digits are correct, I can't
figure out how or why excel is converting that last digit to 0 on
every cell.

Now I've read the Excel only support 15 digit numbers. I don't need to
calculate these numbers in anyway. Is there some way to set Excel to
open .csv file in all text formatted cells so I can get the
information in correctly?

Thanks in advance!
 
J

JE McGimpsey

Record a macro of importing the file using the Data/Get External
Data/Import Text File... In the Text Import wizard, third pane, select
the credit card field and choose the Text radio button.

Post back if you need help with the macro.
 
D

Dave Peterson

And just to add to JE's response.

Rename that .csv file to .txt.

If you don't, then when you rerun that recorded code, excel will ignore your
settings.
 

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