Impoet Text file - Keep leading zeros

JEB85

Board Regular
Joined
Aug 13, 2010
Messages
238
Hi Guys,</SPAN>

I have numerous Excel files that are in the same format which I’ve merged as one text file to import into powerpivot.</SPAN>

One of the columns of data I have on the face look like numbers but I have them stored as text e.g 09312000. This is important because I need to keep the leading zeros.</SPAN>

When I import the data into powerpivot I’m losing the leading zeros.</SPAN>

How do I get around this?</SPAN>

Thanks</SPAN>
 
Hi NickyvV, thanks for the suggestion - I would normally use Excel but the file is over 1 million records and growing. Can you think of any other solution? It's been driving me crazy!

Thanks
 
Upvote 0

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Okay... I have read through these threads. I guess the one question that I still have is if I create a .csv file programatically for a non-excel user and I save the values as:
"01234","Person1"
"12345","Person2"
When I open the .csv file with Excel, why would Excel drop the leading zeros? I thought that would make it clearer to excel to treat it differently?? My users have to open this file all the time. I need to make it easier to open and deal with rather than having an import every time. Additionally, I need to read the file back in with their changes. So, I don't want a bunch of extraneous data.

Thanks,
Dave
 
Upvote 0
I have not used it, and have only had surficial discussions but, it sounds like you might be able to overcome this with PowerQuery
 
Upvote 0

Forum statistics

Threads
1,224,034
Messages
6,176,000
Members
452,695
Latest member
Alhassan

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