Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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
m_woolf
Master II
Master II

Can you provide a sample Excel wkbk?

vishsaggi
Champion III
Champion III

may be use below if not can you tell me what is your expected output?

Fabs(Num#(Yourfield))

cliff_clayman
Creator II
Creator II
Author

The expected output with the provided screen shot would be....

60-89963-00

415

416

417

418

439

439N5900199739

cliff_clayman
Creator II
Creator II
Author

I attached a sample of the Raw data to my reply below.

m_woolf
Master II
Master II

When I read from your sample wkbk, I don't see the issue you are describing.

This is my load script:

LOAD Reference,

     [Reference Key]

FROM

(ooxml, embedded labels, table is Data);

Here is a screenshot of the resulting data in a table box:

test.png

cliff_clayman
Creator II
Creator II
Author

I got the same thing.  Not sure why it would be different in my main app.  It looks different here...

m_woolf
Master II
Master II

Open Settings|Document|Properties|Number.

Select the Reference field and set Number precision to 14.

cliff_clayman
Creator II
Creator II
Author

The field needs to be Text as the values are not just numbers.  Also, I still get bad values when I make that change/

m_woolf
Master II
Master II

Those items pictured are numbers displayed in Scientific Notation formatting.