Write Cell Workbook not allowing me to update Excel without closing it first

Hi @Ampra

You are using Write cell workbook right remove that and use Write Cell. Since workbook don’t allow to keep the excel open and will throw an error.
Check out below image for reference.

image

Regards,

Can you share the screenshot of workflow with activities u have used
@Ampra

Definitely! Are you requesting to see mine?

Yeah share ur workflow screenshot with the sequence of activities visible
@Ampra

I gave that one a shot @Parvathy , however I don’t think I have the same “Write Cell” activity as you do. This is the list I am given when searching :

and the details of this one looks like this:
image

Hi @Ampra

Are you using classic activities or Modern activities. Specify so that I can help you.

Regards,

Of course, this is what we have:


The one I sent you was modern, I believe. There was no “Classic” showing for that step when I selected it from the list. @Parvathy

You used the right activity @Ampra

Regards,

Is there a proper way to reference the cell location? I’m unsure how to convert it to ‘IReadWriteCellRef’ @Parvathy

You need to give like below:

Excel.Sheet("Sheet1").Cell("E18")

Make sure to remove Write Cell Workbook.

Regards.

I tired re-using the expression to reference the sheet and it doesn’t seem to like it. After removing those end-parentheses the exception still remains.

Is this a traditional way to complete this expression or do you think my syntax is off?

Thank you, @Parvathy

Fine

U r using EXCEL APPLICATION SCOPE and passing the filepath
Then why u r using WORKBOOK activities like WRITE CELL WORKBOOK where again u r passing the filepath to update

Ideally u have to use EXCEL based activities and not workbook activities

There are two set of activities package to edit or read a workbook

  1. Excel activities - this works only if excel app is there
  2. Workbook activities - this works even if excel app is not installed

This is the basic difference

As you are opening the excel file with excel application scope inside that again you are trying to open it with workbook activity which will obvious throw that the file is already opened

You are using excel application scope
So let’s use only the excel based activities not the workbook

Search in activity panel as excel where you can see set of activities under the category called excel
Under that choose WRITE CELL activity and use it
Remove the write cell workbook activity that you had earlier

Inside the write cell activity you can mention the cell where u wanna write
Click on plus symbol in the field and mention the cell where u want to type the value

Cheers @Ampra

@Ampra

Give the syntax that I have given above as you are using the excel file by using the activity Use Excel File.

Regards,

Thank you for clarifying the differences of how those two activities operate! I will be sure to only use Excel based activities going forward as long as I have Excel installed on my computer- will stay away from workbook activities.

I was able to apply the fix!! I can now write to the file I wanted :smiley:

I just want to say- I am terribly sorry for how drawn-out this became. I am trying to follow along in the UiPath course but the version in the videos are outdated and different from mine. It is making this process of learning very difficult, but your support has been the only thing keeping me going.

Thank you so very much for your patience and advice with help. You are truly rockstars <3

@Parvathy @Palaniyappan

-Ampra

2 Likes

@Ampra
If you find solution for your query please mark it as solution to close the loop.

Regards,

Sure thing thanks @Parvathy !

1 Like

You’re Welcome @Ampra

Happy Automation
Regards,

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.