Hi All,
I am getting the below error when using write range activity inside folder. What is missing from my side in the below expression.
in_Config(“OutputFilePath”).ToString+“SO_Folder”+““+now.Date.ToString(“dd-MMM-yyyy”)+”"+in_Config(“OutputFileName”).ToString+" ”+System.DateTime.Now.ToString(“dd-MM-yyyy hh:mm:ss”)+“.xlsx”
mkankatala
(Mahesh Kankatala)
August 21, 2024, 5:50am
2
Hi @marina.dutta
You have given the wrong Path in the Write range workbook activity. Try the below expression,
in_Config("OutputFilePath").toString+ "\SO_Foler_"+ DateTime.now.toString("dd-MM-yyyy")+ "\"+ in_Config("OutputFileName").toString+ DateTime.Now.toString("dd-MM-yyyy hh:mm:ss")+ ".xlsx"
Hope it helps!!
1 Like
Hi @marina.dutta
in_Config("OutputFilePath").ToString + "SO_Folder_" + now.Date.ToString("dd-MMM-yyyy") + "\" + in_Config("OutputFileName").ToString + "_" + System.DateTime.Now.ToString("dd-MM-yyyy_hh-mm-ss") + ".xlsx"
1 Like
@marina.dutta ,
This should work:
in_Config("OutputFilePath").ToString + "\SO_Folder_" + now.Date.ToString("dd-MMM-yyyy") + "\" + in_Config("OutputFileName").ToString + "_" + System.DateTime.Now.ToString("dd-MM-yyyy_hh-mm-ss") + ".xlsx"
What you were missing?
\
was missing between OutputFilepath
and SO_Folder
The file name dd-MM-yyyy hh:mm:ss
should not contain special character :
as it’s not allowed by Operating System. I would suggest to use -
or _
as value separator.
Thanks,
Ashok
1 Like
@ashokkarale @pravallikapaluri
Thank You . The error was mainly due to The file name dd-MM-yyyy hh:mm:ss
should not contain special character :
.
\ was there in the Output file path in Config sheet
1 Like
@marina.dutta
you’re Welcome
Happy Automation
system
(system)
Closed
August 24, 2024, 7:42am
7
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.