Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

How to check if sheet of excel file exists in all excel files from directory

Ostap002
6 - Meteoroid

I have a list of excels' file path. 

 

How can I check is these files contains sheet with a specific name?

 

I tried using FileExists() function into file path like 'C\user\blablaba.xlsx|||`Sheetname$`' but this does not work. 

7 REPLIES 7
FrederikE
13 - Pulsar

When you use the Input Tool with a .xlsx that has multiple Sheets, you can select "Import only the list of sheet names". Then you can put a Filter to check for a specific name afterwards. 

messi007
15 - Aurora
15 - Aurora

@Ostap002,

 

You can use the option import only the list of sheet names

 

messi007_0-1657533165944.png

And then you can use filter or formula tool to test 

 

messi007_1-1657533254245.png

 

Hope this helps,

Regards

Ostap002
6 - Meteoroid

@messi007 , Thank you for your reply,

 

But I can't import list of sheet names because i use Directory input and I want check all the files from folder, not only one)

 

Thanks,

Regards 

grazitti_sapna
17 - Castor

Hi @Ostap002, you can do this with a macro.

 

grazitti_sapna_0-1657534140989.png

 

Use this as a macro configuration.

grazitti_sapna_1-1657534214462.png

 

Then you can filter out the sheet.

grazitti_sapna_0-1657534331111.png

 

 

Attaching the macro.

 

I hope this helps!

 

Thanks!

 

Sapna Gupta
FrederikE
13 - Pulsar

In this case, you need a batch macro. See the attached WF.

binuacs
20 - Arcturus

@Ostap002 You need to crate a batch macro for this

binuacs_0-1657534492423.png

 

Ostap002
6 - Meteoroid

Dears,

 

Thank you all for your solutions

 

Kind regards,

Ostap

Labels