community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
#SANTALYTICS

Gather all 9 clues to complete the final Weekly Challenge on Dec 16!

Learn More

Input Multiple Sheets with Different Structure and Export to Separate .CSV Files

Highlighted
Meteor

Hello,

 

I have a single Excel file that contains multiple sheets with different structures. What would be the best way to read in each sheet and then output them to their own separate .csv files?

 

Thanks,

 

-taxdata

Alteryx
Alteryx

@taxdata 

 

You could leverage the macro below developed by @JoeS to read in the data in different formats from the different sheets:

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Input-Batch-Macro-AKA-the-Extra-Dynami...

 

Once you have done what you need to, to the data, you can use the Output tool to output the individual csvs.  This community post may help you:

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Split-Output-Into-Multiple-CSV/td-p/14...

Meteor

Thanks @RishiK - I'm having trouble using the Macro after running the .yxi installer. I am getting the prompt that it was created on a prior version of Alteryx each and every time I open the application now and am unable to find/utilize the macro. Any thoughts? 

Alteryx
Alteryx

@taxdata 

 

I have packaged the macro in the attached workflow.

 

Can you access it this way?

Meteor

Hmm I'm getting a blank canvas when opening the attached workflow.

Alteryx
Alteryx

@taxdata 

 

It is a packaged workflow. Did you answer the prompts to import the workflow into your Designer? Can you screenshot and attach what you can see when you open the package file?

Alteryx
Alteryx

I just tried it and it's breaking for me as well. The path specification for the directory is still an absolute path.

Alteryx
Alteryx

I built something like this a few weeks ago. I just tweaked the workflow and macro for your use case. See if this helps.

 

If you haven't used packages before, you'll get two prompts. The first asks if you want to unpack the package and where to save the files, and the second if you want to run it. By default it unpacks the files in a new folder within the folder that contains the yxzp file.

Labels