Write Excel issue

Hi. I have a data table and I want to write excel this data table in for each row but I get error like that. How can I fix that ?

2 Likes

Hi @sufyant,
You may already opened the file.

  • Close the excel file and try it again
  • Or End the Excel Process from the task manager and try it again
  • Or Give the Kill Process Activity with the Process Name: excel before you do the excel manipulation
3 Likes

We can use WRITE RANGE activity and pass the datatable as input and themat will write that datatable to excel
Write cell will write to a particular cell only

And moreover use a KILL PROCESS activity before writing using excel application scope and write range activity
Where mention as “EXCEL” in the ProcessName property and then Use excel activities

Cheers @sufyant

1 Like

I am using Close Workbook activities but dont working.

like that ?
Ekran Alıntısı

1 Like

@sufyant

Also in the excel application scope please ensure Read only is unchecked and set other properties create new file etc are set accordingly .

3 Likes

Yes, right. But add the kill process before Excel Application Scope.

2 Likes

still I get same error

I creat excel like that

And write to excel like that

What am I doing wrong ? @kuppu_samy @Palaniyappan @SowmyaLeo

Can you show the screenshot of the workflow?

Also check the activities, if you used the Excel App Integration Activity, use those activity only.
If you used the System Workbook Activity, use those activity only.

image

use either of above. the difference is System.File.Workbook works even the MS Office is not installed

2 Likes

use the kill process of excel before Excel Application Scope of Second Screenshot.

1 Like

like that right ? ProcessName is true ?

1 Like

No, you’re killing the file I believe. Please give the Process Name as "excel".

1 Like

I get same error

Can you make the values as static one and check whether is working or not. Once it’s worked in static values, will change it as dynamic later.

1 Like

I am using in for each row. if I change the value as static I wil have 1 excel file

Yes, work it on a separate file and do this operation alone. Once it’s worked perfect, we will merge it into the main workflow.

1 Like

It is

1 Like

I get this error

Make ContinueOnError Property is True in the Kill Process Activity.

image

1 Like