Excel Write Range activity

Hello guys Iam getting the below error for white Write Range activity.

Below is the activity Iam using.

Note : Iam not getting this error for all the run. i have ran it for 10 times and i got this error 5 times.
Some time Iam getting and some time it is not.

Is there any permanent solution for this

Hi,

The error message shows unable to change sheet. So,can you share if something dialog is displayed in excel when error occurred?

If so, turning off DisplayAlert may help you.

Regards,

Hi @Yoichi,

I have ran the process 5 times by making Display alert False.

4 times i didn’t get any issue but in the 5th run i got the error.

Activity :

When i ran last time i got this error also.

Hey @Gokul_Murali,

This error occurs when Excel file or sheet is locked during write operation. Ensure Excel process is killed before writing and enable “Excel Save Changes” with retry scope. Also check large data limits or invalid cell references.

@Gokul_Murali

Use Kill Process to kill Excel and then put Excel process scope

@rlgandu @Mir.Jasimuddin

Iam using kill activity and delay also but still its happening. the error is not happening for each run but after 4 or 5 run it might come I don’t know Why

When i manually open the excel file iam getting a popup for excel product license.

@Gokul_Murali

Once Restart Your laptop. If it is not get solved consult IT team

Hi @Gokul_Murali , Please login to excel and check you are able to login and resolve the license issue, if not please connect with your IT team for MS Office Suite license issue.

@Gokul_Murali,

Do one thing instead of Excel Activity can you try with Workbook Activity it will do the exact same operation without open the excel. I guess it will resolve by using workbook activity as there has some issues with Excel application

Permanent Solution is (Retry mechanism)
Assign a vRetryCount = 0
Assign a vReadExcelSucess = False
Drag and drop “Dowhile Activity”
Inside have one Outer Try catch >> in Exception keep Kill process of EXCEL
Add one more Main Try catch>> where you can read your file.
And keep one Assign activity = True

So, we are retrying if fails kill and read again

Expression: vRetryCount <2 andalso not vReadExcelSucess

I have applied the license for excel and i ran the process for 8 to 10 times. right now the errors are not coming.

I don’t know why it is happening. before applying the license it is used to work and for a particular run it will give error.

Now I thing it is not happening.

@Gokul_Murali seems like you request for license is automatically accepted because of roles assigned to user. Based on User role, these licensed are issued.

1 Like