Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
cliff_clayman
Creator II
Creator II

How can I replicate Text to Columns from Excel in Qlik script?

I have an Excel file that I am bringing in to QlikView and creating a QVD.  Prior to using Qlik, I ran a macro on the Excel data to do Text to Columns on some of the columns.  I was able to successfully write in the script to use the Text() function on a few on the columns, but it is not working for one in particular.  The values in this column are mixed, meaning that there are some numbers and some text values.  When I run the script and put the field into a List Box, the number values have .000000 after them and I need to eliminate that. 

Reference Field.JPG

14 Replies
cliff_clayman
Creator II
Creator II
Author

Yes, but they should not be displayed like that.  I need the actual value to be displayed.

m_woolf
Master II
Master II

The Scientific Notation is not the actual value, it is the formatted value. Excel applies the formatting automatically because of the column width.

If you insist on keeping the longer numbers in Scientific Notation, then I suggest that you read all the data as Text and strip off the '.000000'

cliff_clayman
Creator II
Creator II
Author

Yes, that was my original intention for posing this discussion thread.  I'm not sure how to do that.

m_woolf
Master II
Master II

I can't reload the qvw you attached, so this is a guess:

replace(Text(Reference),'.000000','') as Reference

cliff_clayman
Creator II
Creator II
Author

I still get the Scientific Notation values when I try that.