web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Write and save a excel file to a local folder in D365FO

(0) ShareShare
ReportReport
Posted on by 252

Hi,

I am trying to create and save a excel/csv file to a path through code in D365. As of now, the code lets the user to download or save the file manually once after the execution. Is there any possibility to download or save the file automatically through the code. I am trying to use File and DocuFileSave classes.

Thanks,

Suren.

I have the same question (0)
  • Suggested answer
    nmaenpaa Profile Picture
    101,166 Moderator on at

    Moved to D365 Finance forum.

    If you use D365 FO in cloud, there's no way how the system would be able to start writing files to your local folders. That would be a huge security issue if websites could access your computer by themselves.

    But you can use an integration platform such as BizTalk, LogicApps or Recurring Integrations Scheduler (free sample app from Microsoft) to poll D365FO, fetch files and save them on local folder. This integration platform or part of it would be hosted locally on your company network on some server and that's how they would be able to access your local folders.

  • Blue Wang Profile Picture
    Microsoft Employee on at

    Hi Suren,

    Go through this.

    About Recurring integration scheduler, please refer this:

    github.com/.../Recurring-Integrations-Scheduler

  • Suren_G Profile Picture
    252 on at

    Hi Blue Wang,

    I have gone through the link that you have shared. Is saving the excel to One-drive is manual? Or is there any way to save it to one-drive through code?

    Thanks,

    Suren.

  • Suggested answer
    nmaenpaa Profile Picture
    101,166 Moderator on at

    Yes, there is a way to save it to one-drive through code. OneDrive is accessible from public internet, unlike your local folders.

  • Suren_G Profile Picture
    252 on at

    Hi Nikolaos,

    Thanks for your response. I am not getting any blog to handle the onedrive save through code. Could you please let me know if there is any blog or code handling the same?

  • Suggested answer
    nmaenpaa Profile Picture
    101,166 Moderator on at

    My first suggestion is to not develop anything, instead use something that others have already developed such as LogicApps. This is most likely cheaper since somebody already figured out all that is needed in the integration.

    If you really want to invest in developing it yourself, you can search first for "d365fo x++ OneDrive". If you can't find anything, then google "c# OneDrive integration", and develop a C# library which you then use from x++ code. It's really nice to be able to benefit of all C# articles, libraries etc in D365FO.

  • Suggested answer
    Sukrut Parab Profile Picture
    71,716 Moderator on at

    I agree with Nikolaos , no need to develop anything using x++ in such a scenario.  power automate , logic apps  helps you in such a scenarios. Take a look at using data package API , one such a example  you can look in below blog post.

    msdynamicsworld.com/.../how-use-power-automate-extract-data-microsoft-dynamics-365-finance-and-operations-data

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 527 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 473

#3
Adis Profile Picture

Adis 284 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans