I am getting this error, please help me , how to

Write Cell Workbook: The filename, directory name, or volume label syntax is incorrect. : ‘C:\Users\v-kuppanim\Documents\UiPath\rpachallenge\OutPut\
Exenon UI Pharma.xlsx’

Hi @munichandra_kuppani

The file path you have given is wrong or incorrect. Please give the correct path.

Hope it helps!!

Hi @munichandra_kuppani

Once check whether the excel file is present in that location or not

Regards,

Hi @munichandra_kuppani ,

It looks like a New Line is added for the File Name, do check the File Path provided. Do check the File Path provided and let us know if it is in the proper format.

1 Like

Hi @munichandra_kuppani

Check the file Path

@munichandra_kuppani

Try this:
“C:\Users\v-kuppanim\Documents\UiPath\rpachallenge\OutPut
Exenon UI Pharma.xlsx”.Replace(Environment.NewLine, “”)

Main.xaml (21.5 KB)
project.json (1.7 KB)

please find out the project , I have attached and give me Answer

@munichandra_kuppani

Pass the path like this in write cell activities:
("C:\Users\v-kuppanim\Documents\UiPath\rpachallenge\OutPut"+currentItem1.ToString+".xlsx").Replace(Environment.NewLine, “”)

after use above one i am getting this error

@munichandra_kuppani

Then try this:
(“C:\Users\v-kuppanim\Documents\UiPath\rpachallenge\OutPut”+currentItem1.ToString+“.xlsx”).ToString.ReplaceLineEndings(" ")

Hi @munichandra_kuppani ,

We would recommend you to add a breakpoint in the For Each Activity and perform a Step into action checking the output at each stage/activity.

So we can identify the output from Immediate Panel for iterative variable (currentItem1).

For a Fast correction, Could you let us know what is the data available in InputData variable, we can understand this part is the root cause and correct the flow accordingly.

again i am getting some error , if use above one

please see screen shot left side , you will get know input_Data values

Hi @munichandra_kuppani

Once check whether the Currentitem1.Tostring gives result or not by using message box. Before Writecell activity.

please see screen shot left side : currentitem1 value

@munichandra_kuppani

Once give it in message box or writeline
“C:\Users\v-kuppanim\Documents\UiPath\rpachallenge\OutPut"+currentItem1.ToString+”.xlsx"

please see screen shot , i am getting value

@munichandra_kuppani

Give whole path in message box

“C:\Users\v-kuppanim\Documents\UiPath\rpachallenge\OutPut"+currentItem1.ToString+”.xlsx"

i am giving whole path in message box : please see screen shot left side , i am getting error

Hi @munichandra_kuppani

In this picture there is some additional space is there in starting position

Try this

"C:\Users\v-kuppanim\Documents\UiPath\rpachallenge\OutPut\"+currentItem1.TrimStart.ToString+".xlsx"

I hope it works!!