web
You’re offline. This is a read only version of the page.
close
Skip to main content
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 14
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)
  • Verified answer
    Martin Dráb Profile Picture
    236,045 Most Valuable Professional on at
    Need to export CSV file on desired local path not on cloud
    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.
  • Verified answer
    André Arnaud de Calavon Profile Picture
    298,168 Super User 2025 Season 2 on at
    Need to export CSV file on desired local path not on cloud
    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
    Jonas "Jones" Melgaard Profile Picture
    4,891 Super User 2025 Season 2 on at
    Need to export CSV file on desired local path not on cloud
    @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
  • Siddharth Muju Profile Picture
    14 on at
    Need to export CSV file on desired local path not on cloud
    hi holly,
     
    in approach 1 how can I set my local path.
  • Suggested answer
    Holly Huffman Profile Picture
    6,520 Super User 2025 Season 2 on at
    Need to export CSV file on desired local path not on cloud
    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.

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

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

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 895

#2
Sohaib Cheema Profile Picture

Sohaib Cheema 811 User Group Leader

#3
André Arnaud de Calavon Profile Picture

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

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans