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, ...
Suggested Answer

How to save Excel File to specif folder in D365?

(0) ShareShare
ReportReport
Posted on by

Dear all.

I would like to save to specific folder an Excel file.

System.IO.MemoryStream memoryStream = new System.IO.MemoryStream();

var package = new OfficeOpenXml.ExcelPackage(memoryStream))
var worksheets = package.get_Workbook().get_Worksheets();
var worksheet = worksheets.Add("Sheet1");
var cells = worksheet.get_Cells();

var currentRow=1 ;

var cell = cells.get_Item(currentRow,1);
cell.set_Value("VALUE__");

package.Save();

// memoryStream.Seek(0,System.IO.SeekOrigin::Begin);
// DocuFileSave::processSaveResult(memoryStream,saveResult);

I would like to save the Excel file to specific folder, for example: save the Excel file to C:

There is any way?

Thanks in advance.

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    237,959 Most Valuable Professional on at

    C: drive doesn't have any reasonable meaning when we're talking about SaaS in cloud.

    If you mean a VM in cloud, you don't have access to disks, therefore storing anything there wouldn't be useful. Also, if you stored it on one AOS VM and they tried to read it from another AOS, it would fails. And a VM can be removed at any time, which would mean losing your data. You should use an Azure storage instead.

    If you mean C: of a local machine, the web server running in cloud doesn't have access there. You can either let F&O store files on in shared storage and read them from there, or you can have a local application downloading data from F&O (e.g. Recurring Integrations Scheduler).

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
Martin Dráb Profile Picture

Martin Dráb 592 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 305 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans