I want Datatable to Excel automatically creating new folder and writing into it

From NewFolder to FolderPath or from Path

Ok I got it now

1 Like

Still same
No change in error

@Bhushan_Nagaonkar ,

Could you delete the Path variable created as well.

I have deleted it. I will share a screen shot


I also tried writing Folder Path in place of Path
Assign show ILocalResource should I change it to string

@Bhushan_Nagaonkar ,

Yes. The datatype should be string.

However, there is a lot of confusion. Do change it to string and if there are any further conflicts, Try to do the steps mentioned in the post above from the Start. Else we could provide a xaml.

1 Like

Thanks it really worked. I did the changes. One more question can I save this in the folder I want

Yes. In that case, you would require to modify the FolderPath or NewFolder variable value assignment in the below way :

Path.Combine("YourFolderPath",Now.ToString("dd_MM_yy_HH_mm_ss"))

Notice that, previously I had used Environment.CurrentDirectory to create the Folder in the project’s directory.

Thankyou so much. It was really helpful of you

1 Like

Dont we have to assign any variable to Create folder and Pass it down to excel. Because Im getting an error and unable to create excel.

@Bhushan_Nagaonkar ,

Could you provide us with what was the error message faced.

It is always better to provide more info on what issue is being faced (at the beginning itself) so that we can help you better, We would not be able to extensively help with very little info. :slightly_smiling_face:

MicrosoftTeams-image (44)

Sorry for inconvience, I will be careful next time for sure

This is when I tried passing a variable

@Bhushan_Nagaonkar ,

I believe you are assigning the value to Output Property instead of In folder Property :
image

Dont we have to pass any value in the output that variable can be carried forward.

I did this thats when I got this error
MicrosoftTeams-image (44)

Im unable to create a new excel file path is there any wrong with my sequence

@Bhushan_Nagaonkar ,

Could you show what is the value passed to Write Range Activity ?


no matter wherever i give the extension it is giving me an issue. I tried to remove .To string still an issue

@Bhushan_Nagaonkar ,

As Already shown above, the .xlsx is a string that is appended inside the double quotes itself "".

If you could check back the post suggested above, you might get the idea.

In your case, it should be like below :

Path.Combine(FolderPath,"OutputDRLAPI_"+Now.ToString("dd_MM_yy_HH_mm_ss")+".xlsx")
1 Like

Oh, i mightve not notice my bad. Thankyou for your quick answers

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.