Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
Black_Hole
Contributor II

Import from Excel to QVW specific range

Hello all,

I try to import a table from Excel to QVW but I don't want to export all the first sheet.

Indeed, I would like to know how I can specify the range of my table which is defined by four columns (from I7 to L7). 

Below my current script:

TAB_PRODUCT:
LOAD * FROM
[C:\Users\Desktop\Product.xlsm]
(ooxml, embedded labels, table is Sheet1);

Thank you in advance for your help.

Labels (2)
1 Solution

Accepted Solutions
mwoolf
Honored Contributor II

Re: Import from Excel to QVW specific range

File Wizard.png

1) Use the Tables dropdown to select the desired sheet.
2) Click the Header dropdown, select lines, and choose the number of lines.
3) Click the Labels dropdown and choose Embedded Labels (if your data has labels.
4) Click to delete any columns you don't want to load. You can always deleted these from the load script after it is generated.

Read the section of the manual dedicated to the File Wizard for detailed information.

9 Replies
mrtinsjoao
New Contributor III

Re: Import from Excel to QVW specific range

Great Day,

Change de * for Column names

TAB_PRODUCT:
LOAD

[I],

[J],

[K],

[L]

FROM
[C:\Users\Desktop\Product.xlsm]
(ooxml, embedded labels, table is Sheet1);

mwoolf
Honored Contributor II

Re: Import from Excel to QVW specific range

If you use the File Wizard, it is easy to select which columns should load:

File Wizard.png

Black_Hole
Contributor II

Re: Import from Excel to QVW specific range

Hello @mrtinsjoao , @mwoolf ,

Thank you very for your replies.

@mrtinsjoao : I try it, but I receive an error message saying:

"System error: Filesystem::FindEx non existing dir: Incorrect function: "I,J,K,L

Please could you help me to understand why I have this error.

@mwoolf : Yes, thank you. In my case, I prefer to have a script to import data. That's why I don't use the file Wizard.

Thank you in advance for your help.

Black_Hole
Contributor II

Re: Import from Excel to QVW specific range

Re @mrtinsjoao ,

I'm not sure, but maybe I need to specify the start row next to the column label ([I], [J],[K],[L]).

Because my table begins at the 7th row (the header of my table has for range I7:L7).

If it's the reason of the previous error message. Please could you tell me how I can specify the start row of my table.

Thank you for your help.

mwoolf
Honored Contributor II

Re: Import from Excel to QVW specific range

The File Wizard generates script.

Black_Hole
Contributor II

Re: Import from Excel to QVW specific range

Re @mwoolf ,

That's true, I forgot about that. Thank you for this reminder.

So, I try to export using the Wizar File. But I don't see where I can specify the range of my table and in particular to precise that the header of my table is from I7 to L7.

Please could you help me.

Thank you in advance for your support.

mwoolf
Honored Contributor II

Re: Import from Excel to QVW specific range

File Wizard.png

1) Use the Tables dropdown to select the desired sheet.
2) Click the Header dropdown, select lines, and choose the number of lines.
3) Click the Labels dropdown and choose Embedded Labels (if your data has labels.
4) Click to delete any columns you don't want to load. You can always deleted these from the load script after it is generated.

Read the section of the manual dedicated to the File Wizard for detailed information.

mrtinsjoao
New Contributor III

Re: Import from Excel to QVW specific range

The Correct Answer
TAB_PRODUCT:
LOAD

[@9],

[@10],

[@11],

[@12]

FROM
[C:\Users\Desktop\Product.xlsm]
(ooxml, embedded labels, table is Sheet1, header is 7 lines);
Black_Hole
Contributor II

Re: Import from Excel to QVW specific range

Re @mwoolf , @mrtinsjoao,

Thank both of you for your help.

I tried the two solutions and it worked successfully.

@mwoolf : Thank you to have detailed step by step the import from Excel. Your solution is a good alternative for the newbie with QVW (like me ^^).