Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Export to csv issue

dear all,

when i export data from Qlikview application to abc.csv its remove zero or zero's from the start of text or number type columns for example,

value is 0123456 its show in csv 123456 or 001234 its show 1234 or 0001234 its how 1234.

kindly guide how to resolve this.

Regards,

Zain.

14 Replies
jerrysvensson
Partner - Specialist II
Partner - Specialist II

Try this:

text(field) as field

in your script.

QlikView interprets the data as number and will remove the 0.

Not applicable
Author

Dear, did before post but found no change.

Regards,

Zain.

sasiparupudi1
Master III
Master III

can you post a sample please?

quwok
Creator III
Creator III

Did you open your file in Excel? Have you check how the data looks like in a standard text editor such as Notepad?

Not applicable
Author

Yes, and working fine.

issue is i have large amount of data to export, due to this QV goes to export data to csv format automaicly and its exclude leading zeros. 

Regards,

Zain.

quwok
Creator III
Creator III

I wasn't referring to exporting as Excel, but once you have the csv file, did you tried opening it in Notepad and verify the output that way?


qlikviewwizard
Master II
Master II

Hi,

Use this in scrit:

text(field) as field



It is better to upload the qvw with sample data to demonstrate your requirement. Thank you.

Not applicable
Author

Yes checked new mins ago and found data is perfect, also export data into access and got result fine.

but why excel is excluding leading zeros, kindly reply if you know that.

Thanks Kwok Chong for time and replies.

Regards,

Zain.

ganeshreddy
Creator III
Creator III

Hi Zain,

Try this

repeat('0',7-len(Field))&[Field] as [New Field],

Regards,

Ganesh