Reading a particular worksheet and invoke a certain workflow?

Hello Team,

I have an excel workbook with three worksheet namely Document_CH587, Shell and Total.
Document_CH587 is the main worksheet where I filter out data for shell and total respectively as you can see below.

So I go ahead and create an invoice for each but the workflow for creating the invoice is the same for both(Shell and Total), but the sale details differ.

Is there a way I could read the worksheets and if they’re equal to Shell it operates a certain way as well as for Total.

Hope am clear enough.

Kindly advise.

Regards,
Kakooza Allan Klaus

Hi @Kakooza-Allan-Klaus

What is the condition to switch to Invoice or Sales Details-August ?

1 Like

Hi @GreenTea,

I don’t have a condition there I just use UI Automation

Hi @Kakooza-Allan-Klaus

Sorry, I am not clear enough. What I meant is do you have a criteria to determine what you read in worksheets are equal or different? What do you meant by operates a certain way - is it a condition like If this, then do A, else do B…

Hi @GreenTea,

That’s what I actually I want because I don’t have it at the moment.

Hi @Kakooza-Allan-Klaus

Ok, let’s rephrase it. What is the outcome you desired ?

1 Like

Hi @Kakooza-Allan-Klaus,

I see you want to use 1 workflow only for Shell and Total however want to run part of logic conditionally.

So when you are calling that workflow, how about passing sheet name as argument in that workflow and within that workflow, use a if-else block to drive changes to the sale logic based on sheet name this workflow was called.

And when you are calling that workflow its inside a loop for reading worksheets one by one.

Regards
Sonali

2 Likes

Hi @sonaliaggarwal47,

I think just by reading this I see that it will solve my problem.

Thank you very much

1 Like

@Kakooza-Allan-Klaus,

Glad to hear that :slight_smile:

Regards
Sonali

1 Like