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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Need to export CSV file on desired local path not on cloud

(2) ShareShare
ReportReport
Posted on by 26
Hi all,
 
I need to export CSV file to my local path, not on the cloud in D365 finance and operations application.
 
could anyone kindly let me know how I can achieve this?
 
 
 
thank you.
Categories:
I have the same question (0)
  • Suggested answer
    Holly Huffman Profile Picture
    6,538 Super User 2025 Season 2 on at
    Hi there! Good morning, evening, or afternoon - depending on where you are :) Hope you are well today! 
    1. Use X++ code to generate and download the file
    • You can write a custom X++ class to generate the CSV file and allow the user to download it locally via their browser. Here's a high-level outline:
    • Create a Runnable Class in Visual Studio.
    • Use a TextStream object to write the CSV content.
    • Use the File::SendStringAsFileToUser() method to prompt the user to download the file.
    Example snippet:
    x++
    public static void main(Args _args)
    {
        TextStreamIo textStream;
        str csvContent = "Column1,Column2,Column3\nValue1,Value2,Value3";
        textStream = TextStreamIo::construct();
        textStream.write(csvContent);
        File::SendStringAsFileToUser(textStream.getText(), "ExportedFile.csv");
    }
    1. Use DMF - data management framework
    • If you prefer a no-code approach, you can use the Data Management Framework to export data to a CSV file:
    • Go to Data Management > Export.
    • Create an Export Project and select the entity you want to export.
    • Set the file format to CSV.
    • Run the export job and download the file from the Data Management workspace.
    1. Automate file transfer to local path
    • If you need to automate the process of saving the file to a specific local path, you can:
    • Use Power Automate or a custom script to transfer the file from the cloud to your local machine after exporting it.
  • Siddharth Muju Profile Picture
    26 on at
    hi holly,
     
    in approach 1 how can I set my local path.
  • Verified answer
    Jonas "Jones" Melgaard Profile Picture
    4,988 Most Valuable Professional on at
    @Holly Huffman the code snippet is incorrect, you are using methods that do not exist in F&O.
     
    @CU11031133-0 where is the local path? I've used the recurring integration scheduler for system-to-system integrations, but it might not be suitable in your scenario
    https://github.com/microsoft/Recurring-Integrations-Scheduler/wiki#export-job
  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,158 Super User 2025 Season 2 on at
    Hi Siddharth,

    There is no direct option to save a file from the cloud application in a local folder as Dynamics 365 is a SaaS application which is not aware of your hardware. You would either need to:
    • download it and then choose where to save it.
    • use the recurring integration scheduler as mentioned by Jonas.
    • store it at a specific cloud location and use other middleware to retrieve the file from the cloud and store it locally. 
  • Verified answer
    Martin Dráb Profile Picture
    237,976 Most Valuable Professional on at
    When you download a file from internet, it's you as a user who selects a path on your computer where to store the file. Web servers on internet can't (fortunately!) manipulate your files.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 449 Super User 2025 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 422 Most Valuable Professional

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans