Free Trial

Alteryx Designer Desktop Discussions

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

Help creating separate worksheets with unique columns

missgina
7 - Meteor

I need to create multiple files and tabs in excel.  The problem is when I prepare the data using a crosstab, every tab ends up with all columns vs. those populated.  I wish to keep only the columns populated.

 

Here is some sample data

 

DatasetTabnameGrpDatavalue
X1A1
X1B2
X2B1
Y3C1
Y1B3

 

I run a cross tab, grouping by dataset and tabname where the Column Header is GRP and Value is Datavalue

I output the data where I create the filename and sheetname as a combination of the Dataset and Tabname.

 

The issue is Dataset X, Tab 1 shows columns A, B and C with no data in column C

Dataset X Tab 2 also shows column A, B and C with data only in column B.

 

How can I limit each tab to have only the columns that have data?

 

 

 

 

4 REPLIES 4
JosephSerpis
17 - Castor
17 - Castor

Hi @missgina one way you can do what you ask is with a batch macro I have mocked a workflow which uses a batch macro. Let me know what you think.

missgina
7 - Meteor

Thanks for trying to help.  Unfortunately I'm not well versed in macros.  I opened your solution and got a warning that it uses a newer version of Alteryx but I'm on the latest so not sure what the issue is.    I'm getting a ? for your macro with "entry point is invalid" error.  Not sure what I need to change to get it to run.

danilang
19 - Altair
19 - Altair

Hi @missgina 

 

Once you've extracted the workflow and the macro from the package, in the directory .\Multiple_Excel open the Excel_BatchMacro.yxmc in Notepad.  Change the version number in the second line from 2019.2 to your version number and save the file.

 

example

<AlteryxDocument yxmdVer="2019.2"> 

becomes  

<AlteryxDocument yxmdVer="2018.3">

 

Reopen the main workflow and the macro should be visible

 

Dan

 

missgina
7 - Meteor

That worked - thank you...

Labels
Top Solution Authors