Excel format changed issue

Hi @Palaniyappan @lakshman, kindly help.
I have an excel format, but sometimes it comes with the two same column name so in this case, I want to stop the process and send its screenshot and confirm by email also. can you help me how I resolve this issue?
image
If there is no same name column then I want to proceed it.

One more it will be a Business Exception Right? right me if I am wrong.
image

1 Like

No worries
If we are having same column name we can use the column index say 0, 1, 2 where first column starts with index 0
So try to mention the column index instead of column name
—next to take a screen for this kind of error can’t be taken as it occurs inside a application and here the application is excel…
— rather taking screenshot we can use a log message activity with a message like “error occurred with excel”
— or if we want to take screen we can include all the process in try block in try catch activity and mention the a page said log message activity followed by take screenshot activity and get the output of this take screen shot with a variable of type image
—then use save image activity with the variable obtained above from take screenshot and mention the file path where we want tot save the image in .pmg format

Hope this would help you
Cheers @balkishan

2 Likes

I agree with your point bro. But client want to use the header only. Because they want bot informed us whenever two same columns name occur in the excel.
So can you please tell me about this. That time I have to informed us by email and stop the process. If there is no same type Columns in the excel then I want to proceed further.
For this I given a Buisness Exception.
And build like this. Please correct me if I’m wrong.
image

Finally I want to use in state machine.
image

@Palaniyappan plz reply bro :slight_smile:

2 Likes

@Palaniyappan @lakshman @Lahiru.Fernando I am waiting your positive response if you can help bro.

1 Like

sorry bro, this I didn’t get

2 Likes

You are done actually @balkishan

Pls go ahead as what you have mentioned is correct I.e., if the error occurs it will go to catch where exception is caught and we can even add a activity called send outlook mail activity with a message like “the bot failed unfortunately because of same columnname”or if the workflow doesn’t have any such similar column names then it will continue as it is

Cheers @balkishan

2 Likes

But here I have to the condition bro. so what condition to give here.
image
image

so here I have to create a Business Exception Variable or System?

2 Likes

Fine
Hope you have the catch block in the Reading excel state
Use a assign activity in the catch block like
If_any_error = True
Where If_any_error is a variable of type Boolean

Then in the Transitions mention the condition like
If_any_error = True
Then it should go to close state or to the proceed state

Or even we can use if any business exception variable is used
And mention condition like BusinessException = Nothing
Or
BusinessException =True
(Based on the variable type Boolean or string)
Mention that In transition buddy

Hope this would help you
Cheers @balkishan

2 Likes

No, I put the Reading Excel in a **** bro [ Bro ReadingExcel will come in a Try Block Right me If I am wrong]

I can assign like this also na bro BuisnessException
image

Right me If I am wrong. Please @Palaniyappan

2 Likes

Fine keep this assign in the catch block as we want this to be used only when exception occurs else with the default value of SystemError variable (define a default value for it in the variable panel with value as Nothing)
Yes of course we can mention this in transitions as a condition like this
SystemError = Nothing
So if the above condition is true it will go for proceed state or if the condition is
SystemError = exception
Then will go to close state

Cheers @balkishan

1 Like

@Palaniyappan
I given this as BuisnessException as it’s not a SystemException. Bcz It’s error in the exceltemplate right. Please right me If I am wrong. OR should I mention is a SystemExceptionError
And I mentioned in the Catch Block is
image

1 Like

So were you able to get this done @balkishan
:slight_smile:

1 Like

I given this as BuisnessException as it’s not a SystemException. Bcz It’s error in the exceltemplate right. Please right me If I am wrong. OR should I mention is a SystemExceptionError
And I mentioned in the Catch Block is
image

Are to be very simple
Mention as
SystemError = “Bot failed because of same columnissue”
Where SystemError is a variable of type string

Simple buddy @balkishan
Keep this in Transition mention like if
SystemError = Nothing the go to proceed or go to Closed

Cheers @balkishan

1 Like

Okay bro, I am giving this as a systemError only not BuisnessError Right?

1 Like

Yes
SystemError is a variable amid type string

1 Like

why It’s showing me error here bro If I already connecting with the Transaction state.
image

1 Like

Use final state buddy @balkishan
Because as you have used state which should have at least one transition as how we have for Red Excel state

So nothing very simple take all the activities mention in those two states and place them inside a final state activity instead of a state activity
Other than that everything same

Cheer @balkishan

But I want to create separate State for Close and for Further Proceed State.

Final state I have to used in Try Catch bro?

I have done as you suggest me bro.
But here it’s throwing me an error. I want whenever this error occured it intimate the customer and end the process.
image

image