Metalteck
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?
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
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?