Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Extract sheet name and data from an excel.

KrishnaChithrathil
11 - Bolide

I've an excel with two sheets. let's say  sheetA & sheetB. SheetA and SheetB has some data. Both the sheet data has some connection.

 

I want to check whether SheetB is present or not. If it's not present, Create it with the data available in SheetA. means, for example, SheetA has 2 colums Firstname & Lastname. So the data in SheetB would be concatenated data of SheetA. that is. Firstname + Lastname.

 

So if SheetB is not present, take Firstname & Lastname from SheetA, and create SheetB with Firstname + Lastname 

 

Any help?

 

-Krishna

 

What i tried is....

 

KrishnaChithrathil_0-1657208828227.png

But the challenge I'm facing right now is, even if the SheetB is present, it'll create.

How can I block that? that is, if count !=0, the workflow should not execute further.

 

 

13 REPLIES 13
gabrielvilella
14 - Magnetar

One way to not run an output tool is by enabling the option to Take table/file name from field. If there are zero records, the tool will not run. 

KrishnaChithrathil
11 - Bolide

Hey @gabrielvilella,

 

I really appreciate the time you took to study my scenario. But I really didn't understand the solution you suggested to try out. Could you please be more specific on the point?

 

Krishna

gabrielvilella
14 - Magnetar

See this example here, if there are no records, the output tool will not run.

KrishnaChithrathil
11 - Bolide

Hi @gabrielvilella,

I went through the code you've provided.

Just have few doubts. What is the role of 'Fullpath' column there? Since we are filtering if Field1 = a, the result will be same without Fullpath column, right?

Please excuse and correct me if I'm wrong.

 
gabrielvilella
14 - Magnetar

The FullPath field is there just so I could use the Take table/file name from field option. Without this option enabled, the output tool would still run if there are no records. 

Emmanuel_G
13 - Pulsar

Hi @KrishnaChithrathil ,

 

I did a test that you will find attached that does exactly what you want. It will create a tab if it does not exist and will contain the rows and columns of the tab that is present in your excel file.

 

You can test by adding sheet4, sheet5 as you want. You just need to provide name of desired adding sheet in column Sheet_missing as in workflow.

 

Let us know if it works the way you want.

 

Have a nice weekend !

 

Emmanuel_G_0-1657288716556.png

 

KrishnaChithrathil
11 - Bolide

Hey @Emmanuel_G 

I really appreciate your effort. Thanks for that. I tried running your workflow. But in most of the tools, I couldn't see any output coming up. So I'm finding it difficult to understand.

 

I'm attaching an excel with this reply.

I've 2 sheets. SheetA & SheetB. Can you generate a workflow to check if SheetB is present or not. If it's not present, create SheetB through alteryx with values from SheetA. that is [First Name] + [Last Name].

 

 

Krishna 

Emmanuel_G
13 - Pulsar

You're welcome @KrishnaChithrathil

 

You can find this test attached.

 

Let me know if it works as you want.

 

KrishnaChithrathil
11 - Bolide

Hey @Emmanuel_G 

Such a legend you are. 😍

That's a perfect solution. And it took a while for me to understand the workflow. Thanks a ton. 😀

 

Just wanted to clarify one more doubt. If SheetB is present, I'm getting a warning in Append tool. Is there anyway we can remove that?

I'm attaching the image below.

 

KrishnaChithrathil_0-1657464002956.png

 

 

Krishna 

Labels