Link to home
Start Free TrialLog in
Avatar of Metalteck
MetalteckFlag for United States of America

asked on

Retain Leading Zeros when exporting from SQL to Excel

I currently have a field in my database; ZIP Code and it is formatted as char(10).
When I run my query in ssrs, I get the leading zero.
But when I export it to excel, it disappears.

Is there a way I can keep the leading zero when I export?
ASKER CERTIFIED SOLUTION
Avatar of PortletPaul
PortletPaul
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
How do you export the data? What tool do you use?
In excel you can have special formats with the numbers of zeros you want.
For ex:
format is 00000
1 => 00001
99999 => 99999

You even have in Cell Format / Number  / Category = Special / Type = Postal Code
metalteck, do you still need help with this question?