Hi All,
I am getting an error

for the write range activity workbook. I changed the slash also but same error.

in_Config(“OutputFilePath”).ToString+now.Date.ToString(“dd-MMM-yyyy”)+“/”+in_TransactionItem(“SubscriptionID”).ToString+in_Config(“NetsuiteExtractedFilename”).ToString
lrtetala
(Lakshman Reddy)
2
Hi @marina.dutta
Try this
in_Config(“OutputFilePath”).ToString+now.Date.ToString(“dd-MMM-yyyy”)+“\”+in_TransactionItem(“SubscriptionID”).ToString+in_Config(“NetsuiteExtractedFilename”).ToString"+“.xlsx”
lrtetala
(Lakshman Reddy)
3
@marina.dutta
Please provide the values of variables it is better understanding for us
@lrtetala
When I used my way I correctly got the values correctly. Dont know why it gace illegal characters.

lrtetala
(Lakshman Reddy)
6
@marina.dutta
If SubscriptionID is folder then put "\"
after SubscriptionID
If NetSuiteExtractedFilename contains .xlsx then dont give it last otherwise add “.xlsx” at last
Once try
in_Config(“OutputFilePath”).ToString+now.Date.ToString(“dd-MMM-yyyy”)+“\”+in_TransactionItem(“SubscriptionID”).ToString+"\"+in_Config(“NetsuiteExtractedFilename”).ToString"+“.xlsx”
@Anil_G @lrtetala
I am getting same error for folder also.
in_Config(“OutputFilePath”).ToString+now.Date.ToString(“dd-MMM-yyyy”)+“"+in_TransactionItem(“SubscriptionID”).ToString+”"
But all these time it was working.The same path was working.
This is my folder structure
@Anil_G
I am getting same error for folder also.
in_Config(“OutputFilePath”).ToString+now.Date.ToString(“dd-MMM-yyyy”)+“"+in_TransactionItem(“SubscriptionID”).ToString+”"
But all these time it was working.The same path was working.
This is my folder structure
lrtetala
(Lakshman Reddy)
9
@marina.dutta
Try this
in_Config(“OutputFilePath”).ToString+"\"+Now.Date.ToString(“dd-MMM-yyyy”)+“\”+in_TransactionItem(“SubscriptionID”).ToString.Trim()+"\"+in_Config(“NetsuiteExtractedFilename”).ToString+“.xlsx”
postwick
(Paul Ostwick)
10
You should use Path.Combine instead of a bunch of + signs because Path.Combine takes care of the slashes for you.
Path.Combine(in_Config(“OutputFilePath”).ToString,Now.ToString(“dd-MMM-yyyy”),in_TransactionItem(“SubscriptionID”).ToString,in_Config(“NetsuiteExtractedFilename”).ToString)
Also, it’s Now.ToString not Now.Date.ToString
Also, paths use / not \
Anil_G
(Anil Gorthi)
11
@marina.dutta
As mentioned earlier can you please try with path.combine and check
Also please verify your outputfilepath in excel if it has inverted comma in it…if yea remove them
Path.Combine(in_Config("OutputFilePath").ToString,Now.ToString("dd-MMM-yyyy"),in_TransactionItem("SubscriptionID").ToString)
Cheers
supriya117
(Supriya Allada)
12
Hi @marina.dutta
Try this:
Path.Combine(in_Config("OutputFilePath").ToString,Now.ToString("dd-MMM-yyyy"),in_TransactionItem("SubscriptionID").ToString).ReplaceLineEndings("\")
Hope it helps.
@Anil_G
Getting error .
. There is some issue with my subscription Id in_TransactionItem(“SubscriptionID”).
here my SubscriptionID= X0063f000002MaPAAA0
supriya117
(Supriya Allada)
15
@marina.dutta
Try this:
Path.Combine(in_Config("OutputFilePath").ToString,Now.ToString("dd-MMM-yyyy"),in_TransactionItem("SubscriptionID").ToString).ReplaceLineEndings("\")
Anil_G
(Anil Gorthi)
16
@marina.dutta
Did you try with line break replace?
Also it would be good idea to print the string to check what is wrong
Cheers
lrtetala
(Lakshman Reddy)
18
@marina.dutta
In Create Folder give this
Path.Combine(in_Config(“OutputFilePath”).ToString,Now.Date.ToString(“dd-MMM-yyyy”),in_TransactionItem(“SubscriptionID”).ToString.ReplaceLineEndings(“”))
lrtetala
(Lakshman Reddy)
20
@marina.dutta
Give this
Path.Combine(in_Config(“OutputFilePath”).ToString,Now.Date.ToString(“dd-MMM-yyyy”),in_TransactionItem(“SubscriptionID”).ToString.ReplaceLineEndings(“”).ToString)
lrtetala
(Lakshman Reddy)
21
@marina.dutta
Is it working
If not
Try this
Assign->
SubscriptionID=in_TransactionItem(“SubscriptionID”).ToString.ReplaceLineEndings(“”).ToString
Then use
Path.Combine(in_Config(“OutputFilePath”).ToString,Now.Date.ToString(“dd-MMM-yyyy”),SubscriptionID.ToString)