Extract sheet name and data from an excel.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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....
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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 !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You're welcome @KrishnaChithrathil
You can find this test attached.
Let me know if it works as you want.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
Krishna
