Want to add date format in excel

Hi @supermanPunch
i want to add date format in excel like this:
image
as a solution i have done this:-
image
the path i have put in write range is:_
Config(“Bitlockeroutputfile”).ToString+"_"+DateTime.Now.ToString(“ddMMMyyyy_hhmmss”)

However i’m getting this error:-

image

Try the filename like this

Config(“Bitlockeroutputfile”).ToString+"_"+Now.ToString(“ddMMyyyy”)+".xlsx"

@NIVED_NAMBIAR

@mitul_choudhary

Check the config(“Bitlockeroutputfile”).ToString has the value and you passed the arguments correctly

Hope this may help you

Thanks

1 Like

this the the path which i have filled in config file:_
\INDELSRV1034\UIPath_Generated_Excel\Compliance report\compliance report.xlsx

@mitul_choudhary

As it is showing object reference error, try to use a log message activity and pass the Config(“Bitlockeroutputfile”).ToString

If you are getting the value without any issue then also cross check if this is networkpath then it should start with double(\)

The config value contains the .xslx remove that and follow as below

Config(“Bitlockeroutputfile”).ToString+"_"+Now.ToString(“ddMMyyyy”)+".xlsx"

Hope this may help you

Thanks

tried log message activity:-

path which is stored in config file after removing xlsx:_
\\INDELSRV1034\UIPath_Generated_Excel\Compliance report\compliance report

STILL NOT HAPPENING

@mitul_choudhary

Check if you are passing the argument correctly

because the argument is not passing correctly and you are getting a null value which is throwing the error

Thanks

Hi @mitul_choudhary
can u check in the Local panel while debugging which one is seen as empty here

Config(“Bitlockeroutputfile”).ToString or dtBitLocker?

couldn’t find Config(“Bitlockeroutputfile”).ToString

i can say that i have passed right argument as earlier it was running fine before i used
Config(“Bitlockeroutputfile”).ToString+"_"+Now.ToString(“ddMMyyyy”)+".xlsx"
this format.

earlier it was just
Config(“Bitlockeroutputfile”).ToString

@mitul_choudhary

If Config file is passing correctly then atleast log message activity should pass

but it is triggering error because of null error, also check the spelling of the config value

Check below the dt table is showing as null

Hope this may help you

Thanks

thanks,
@ksrinu070184 @NIVED_NAMBIAR
is there any way that i can get result in ddmmyy-----16042021
currently i’m using this string:_
“\INDELSRV1034\UIPath_Generated_Excel\Compliance report”+“compliance report_”+DateTime.Now.ToString(“ddMMMyyyy_hhmmss”)+".xlsx"

@mitul_choudhary

“\INDELSRV1034\UIPath_Generated_Excel\Compliance report”+“compliance report_”+DateTime.Now.ToString(“ddMMyyyy”)+".xlsx"

Use as above way

Hope this may help you

Thanks

@ksrinu070184

Pls help…!!

image