Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
解決済み

URGENT: How to input specified sheet for multiple excel files(xlsx) in alteryx

vaibhav_jain
アステロイド

Hi, 

Have created a Batch macro for reading multiple sheets for multiple excel files. However, i want to read only first sheet for all the 3 files.

 

sample data attached along with the batch workflow. Please guide how i can specify a particular sheet to be read.

8件の返信8
DultonM
ボリード

Hi @vaibhav_jain! One option is to put a Sample tool right after your Input in the batch macro so that only the first record reaches the Dynamic Input tool (aka only the first sheet per batch is read). If you know the sheet's name in advance, you could add a filter in that same spot and add an interface tool to the filter that will allow you to enter the sheet name(s) you wish to keep. Hope this helps!

pcatterson
ボリード

I've created a macro that I believe will be of help.  It gives you the option to not only see the files within a folder, but also shows the sheets within an excel file as a new field called FullPathAndSheet.  Then you can use a filter to specify which sheets you want to collect in the data and then run your batch macro.

vaibhav_jain
アステロイド

Hi,

When i am opening the macro, getting a ?. The macro is not attached properly. Please suggest.

pcatterson
ボリード

Sorry, there is a macro within a macro situation.  You'll need this one as well.

vaibhav_jain
アステロイド

Hi DultonM,

 

I have applied your logic of applying filter for selection of sheet1. The macro is working fine however when i am using directory tool to read the three files, its showing error. PFA workflow. Please guide.

 

vaibhav_jain
アステロイド

Main workflow

pcatterson
ボリード

I use an older version of Alteryx, so I cannot open your workflows.  Sorry

DultonM
ボリード

Hi @vaibhav_jain,

 

I don't know if you're still having troubles with this workflow, but in response to your latest post, it appears that the Action Tool connected to the filter in your macro is replacing the entire filter expression with the full path from the Control Parameter. Is it always Sheet 1 that you wish to input? If so, you shouldn't need any interface tools connected to your Filter. Also, I happened to notice that a Browse tool in your main workflow went rouge and doesn't have an input connection.

投票
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
ラベル