Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How can I format numbers so that leading zeros are preserved when exported to Excel?

I havea series of plant numbers most of which have 4 digits but some have 3 digits and 1 letter. All have 4 characters and some have 1,2 or 3 leading zeros. When exported to Excel the leading zeros are dropped except for those entries which contain a letter as they are formatted as text. For example 0010 is displayed as just 10 but with 001F the leading zeros are preserved when exported to Excel. Is there any way that all the numbers can be formatted as text or is there some other way of preserving the leading zeros when the data is exported to Excel? Any advice would be appreciated.

2 Replies
Not applicable
Author

I'm having the same exact problem. Anyone find a resolution to this?

Miguel_Angel_Baeyens

Hello,

Take a look at this thread, which seems to be related to what you are telling.

Use the sample code in that post. Tip: use the Text() function to represent it as string.

Hope that helps