Write Cell no working

Hi
This is usually a tricky one for me. I am using a Write cell into Excel. This activity is within a “For each Row” activity.
I started by adding a “Set Variable Value” with counter+1

Then I do a validation and Else if to write back on the excel. For the excel file I have a FilePath, and I am using the template file as well. I set a variable value for the sheet range, which I then use to add on “Where to write”, as image below. (“Y”+Counter.ToString). Problem is that robot is doing the validations but not writing back to the excel

Hi,

For now, can you check / share content of FilePath variable? It may not be same where you expect.

Regards,

Sure. FilePath is set as variable: Directory.GetFiles(“C:\Users"+Environment.UserName+”\Downloads",“SF ORG ID*.xlsx”).OrderByDescending(Function(d) New FileInfo(d).CreationTime).Tolist(0)

Additional note: I use StudioX

Hi,

Can you check actual content of FilePath using MessageBox etc as the following?
Is it same as what you expect?

Regards,

@Karolina_Esquivel

One thing after users and before environment.newline a \ is missing

Also after downloads as well

To avoid such thing use Path.Combine("String1",varible,"string") ..this will ensure proper concatenation

Cheers

1 Like