Hi,
i create a Macro to list all input files along with their sheets name (see below) and now how can i retrieve data from one of these input files based on input file and sheet name without using Dynamic Input tool.
File Name | Sheet Name |
January | High |
January | Low |
February | Red |
February | Blue |
March | Sheet1 |
March | Sheet2 |
April | Green |
May | Monthly |
May | Yearly |
Do i have to create Marco for each of this individual file and sheet name to retrieve data. please advise.
thank you
kauser
@kauser , Use a batch macro for your use case. Once you have the list of file names and corresponding use, a filter tool can be used to filter the required file name and sheet names, attaching a sample batch macro.
First you are still missing one part of the data and this is the full path, so mark this option in the Input Data tool that you are using to get this list.
If all the sheets have the same schema you can use the Dynamic input tool, if not then you need to use the solution that been suggested by @binuacs
Thanks for your response. can you clarify what you have on Sheet Marco. do you list all these sheet name on Sheet Macro.
@kauser The given macro has two functionalities: it can read all the sheet names, and it can combine all the data into one output. First the given macro reads all the sheet names, and second, the macro combines the files into one output. you need to setup only the filter tool to exclude the files or sheet names you dont want in your final output