Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

kamielrajaram
Contributor III

Leading zeros

Good day,

I am having an issue when exporting to excel, where the leading zero's are being dropped. How would I be able to resolve this.

Thank you in advance.

Kamiel

14 Replies
MVP & Luminary
MVP & Luminary

Re: Leading zeros

Hi,

Try using the  Text() in your load script, it converts numbers to text.

Ex:

LOAD

     Text(FieldName) AS Field1,

     '

     '

     '

FROM FileName;

Regards,

Jagan.

kamielrajaram
Contributor III

Leading zeros

Hi,

This is not in the load. It is in the dimension on a straight table. I have edited the field text(field). It displays correctly on the document, but when I click the XL icon the leading zero is dropped.

Regards

Kamiel

Not applicable

Leading zeros

You probably used the formatting in the "Numbers" tab in your object, I guess. My proposal is to import your data as text in your load script, TEXT(YourFigures) AS Field1. Maybe, the problem can be solved when you just go to Settings / Document Properties / Numbers and choose number format "Mixed" and "Survive Reload" in the settings for your field.

Does this work?

Regards,

sebablum

kamielrajaram
Contributor III

Leading zeros

Hi,

Thank you, I have checked and those settings already exist. It seems to have resolved itself. Thnak you for your assistance. Previously under dimension it was =Ttext(field) and now it is =text(field). not sure if this is an issue.

Thank you again for your assistance

Regards

Kamiel

chandashok
Contributor III

Re: Leading zeros

Hi,

          Hope the attached qv file will be help for your requirement,

          Export the table which is available in the attached qv file.

Regards

Ashok.

kamielrajaram
Contributor III

Leading zeros

Good day,

I'm back with the same question. I have tried all mentioned solutions ans none seem to work on a large dataset. I am exporting 400000 rows to excel and the leading zeros are getting dropped. if I limit the dataset, the 0's are present. I am at a loss of whta the issue may be. In my load from the qvd file the load is  Load text(dialling code from file .qvd()qvd. I also adfd acalculated dimesion text(dialling code).

Any help would be appreciated.

Thank you

Highlighted
Partner
Partner

Leading zeros

Hi,

The problem seems like QlikView trying to save memory (hence the issue only with bigger dataset) in a field that all it's records are numeric if the leading zeros are dropped.

I would try to load the field with text(field) (which has worked fine for me on a couple of ocasions) and check the tag assigned (Settings -> Document Properties -> Tables -> Fields). If it still is $numeric $integer edit it to $ascii, $text.  If that doesn't work i would concatenate with an inline load with a space or something that would force QlikView to load the field in text mode.

Regards,

Carlos

kamielrajaram
Contributor III

Leading zeros

Thanks ,

I am getting the following message displayed- Adding system tags is not allowed when I try to edit the tags

Partner
Partner

Leading zeros

Hm, i thought we could edit it...

Well do the inline load thing

Regards,

Carlos