Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

How to load excel excluding one sheet?

Hi guys,

Just wanna ask on how to load excel file to qlikview excluding one/several sheets. See example below.

Sheet names: Master File, Product 1, Product 2, Product 3, Product 4.

From the given sheet names, I want to load the excel file EXCEPT sheet name: Master File.

Please help me get over this. Thanks.

Best regards,

Bill

1 Solution

Accepted Solutions
erich_shiino
Not applicable

How to load excel excluding one sheet?

Hi,

In that script, you can change this line:

    IF wildmatch('$(sheetName)', 'Sales*') THEN  // Only sheetNames that begin "Sales"

to

    IF not(wildmatch('$(sheetName)', 'Master File*')) THEN  // All sheetNames that are not Master File

Hope this helps,

Erich

4 Replies
adhudson
Not applicable

Re: How to load excel excluding one sheet?

Hi,

     You can use the following file as a solution.

     There you have to define the name of the sheets to load in the script.

     If you want to load Except 'Master File' Sheet, you can use the following coding.

     for each vSheetNames in 'Product1$', 'Product2$', 'Product3$', 'Product4$'

         

          Load Statement....

     Next

     Hope this helps

Regards

Andrew Hudson

erich_shiino
Not applicable

Re: How to load excel excluding one sheet?

Hi,

if you are using QV on a win32bit environment (where you can use OLE Jet), you can use the example posted by Celabarasan: http://community.qlik.com/message/195769#195769

You just need to adapt the script to read tables that start with 'Product*'

Hope this helps,

Erich

Not applicable

How to load excel excluding one sheet?

These are possible sheetnames (and there's no definite number of sheets, it can be more than 10, or less than 10.) Only sheetname of sheet1 is fixed.

POSSIBLE SHEETNAMES

  1. Master file
  2. Netbook
  3. Notebook
  4. Mouse
  5. Wire

And etcetera

erich_shiino
Not applicable

How to load excel excluding one sheet?

Hi,

In that script, you can change this line:

    IF wildmatch('$(sheetName)', 'Sales*') THEN  // Only sheetNames that begin "Sales"

to

    IF not(wildmatch('$(sheetName)', 'Master File*')) THEN  // All sheetNames that are not Master File

Hope this helps,

Erich