I have multiple files in directory but I just want to read sheets present in File 1, File 2 and skip other files. Can someone help me build a workflow that would help me extract data from sheets having data in them. I want to exclude sheets with no columns, no data and so on below is the description of sheets present in the files. Attached below are three files of the directory.
Sheets in File 1 and 2 having perfect schema - Jan 24, Feb 24, Apr 24, Jun 24, Jul 24, Aug 24, Sep 24
Sheets in File 1 and 2 having spaces before perfect schema - May 24, Extra
Sheets in File 1 and 2 having column names but no data(need a way to automatically exclude sheets with no data) - Mar 24, Oct 24, Nov 24
Sheets in File 1 and 2 having no column names and data(need a way to automatically exclude sheets with no data) - Dec 24
Sheets in File 1 and 2 having space before only column names(need a way to automatically exclude sheets with no data) - Extra 2
Sheets in File 1 and 2 having having no data and not needed to be included in data pull - Not to be included
Sheets in File 1 and 2 having having data but not needed to be included in data pull - Not to be included 2.
I connected directory tool but it doesn't give option to read sheet names within the files.
Hi @srk0609 - One way to do this is with a nested batch macro. The steps are as follows:
Give this a shot and let me know if something isn't working for you.
@Bren_Spill
Very detailed. 👍
@srk0609
You may want to check this post.
could you please explain with an example workflow because it is very difficult to follow this. I haven't created Macro before so if you could explain me with example it would be great. Thank you.