Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Excel Proble m

I want to import data like below format ,first column should be displayed  and remaining should be below one ,no need to rename in the script  level ,how to import like ?

EXCEL :

LOAD [ ID] as MMM_ID,

'Bedford' as PLANT,

      @1,

     @6,

     @7,

     @8,

     @9,

     @10,

     @4,

     @5  

FROM

(txt, codepage is 1252, no labels, delimiter is ',', msq)

where [ ID] <>' ';

11 Replies
MK_QSL
MVP
MVP

What exactly you want? can you be more specific please?

Not applicable
Author

in this script all fields come from Excel ,Bedford is not in excel ,we are added that field in script ,in the excel my first column name is ID ,I want to display id as id and remaining columns name not to be displayed

,we display like below one .

LOAD

[ ID] as MM_ID,

'Bedford' as PLANT,

      @1,

     @6,

     @7,

     @8,

     @9,

     @10,

     @4,

     @5  

FROM

(txt, codepage is 1252, no labels, delimiter is ',', msq)

where [ ID] <>' ';

Not applicable
Author

Not sure if I understand you correctly.

1.The script looks like first column (ID) is available and is just renamed using "as".

2. Second column (Bedford) is hard coded.

3. Rest is imported from a text file with "None" as labels.

If you want to do that , then write down the hard coded or already available fields as you want, then in script editor click on "Table files", browse to the location of your text file, select and open it and in the "labels" drop down select "None".

Click on finish. You will get a script like this.

Hope this helps!

ashwanin
Specialist
Specialist

Hi Palla,

@1,

     @6,

     @7,

     @8,

     @9,

     @10,

     @4,

     @5

is plant name?

If you want to remove these then just use below scipt,

LOAD

[ ID] As MM_ID,

Bedford As PLANT

    

FROM

(txt, codepage is 1252, no labels, delimiter is ',', msq)

where [ ID] <>' ';

MK_QSL
MVP
MVP

Go to your script and add below code after SET MonthNames= .....

SET HidePrefix='@';

Not applicable
Author

IN the 3 point we have labels but no need to display those one.

Not applicable
Author

Yes, so select "None" in the labels drop down whiel importing the file.

Not applicable
Author

but I want to display ID  right ?

Not applicable
Author

Yes, if ID is already available from your script. You can add it directly giving it whatever label you want.