# I want to use DEE to generate excel data, which package should I import?

**URL:** <https://community.criticalmanufacturing.com/t/i-want-to-use-dee-to-generate-excel-data-which-package-should-i-import/553>\
**Category:** Extensibility\
**Tags:** v11.3, business-rules\
**Created:** [July 7, 2025, 1:21am UTC](https://community.criticalmanufacturing.com/t/i-want-to-use-dee-to-generate-excel-data-which-package-should-i-import/553 "2025-07-07T01:21:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![joy\_jiang](https://avatars.discourse-cdn.com/v4/letter/j/977dab/32.png) [@joy\_jiang](https://community.criticalmanufacturing.com/u/joy_jiang)\
**Post date:** [July 7, 2025, 1:21am UTC](https://community.criticalmanufacturing.com/t/i-want-to-use-dee-to-generate-excel-data-which-package-should-i-import/553/1 "2025-07-07T01:21:40Z")

</div>

I want to use DEE to generate excel data, which package should I import?

---

<div class="post-metadata">

**Author:** ![maximilian\_jung](https://avatars.discourse-cdn.com/v4/letter/m/a9a28c/32.png) [@maximilian\_jung](https://community.criticalmanufacturing.com/u/maximilian_jung)\
**Post date:** [July 7, 2025, 5:29am UTC](https://community.criticalmanufacturing.com/t/i-want-to-use-dee-to-generate-excel-data-which-package-should-i-import/553/2 "2025-07-07T05:29:04Z")

</div>

Hi Joy,

you can use ClosedXML. It already comes with the MES, so you don’t need to install anything, just import the reference in the DEE code.

As an example, I created a simple demo code to show how it works. Of course you will have to adept according to your needs.

UseReference(“”, “Cmf.Foundation.Common.Exceptions”);

UseReference(“ClosedXML.dll”, “ClosedXML.Excel”);

//Please start code here

var serviceProvider = (IServiceProvider)Input[“ServiceProvider”];

string filePath = @“C:\tmp\Demo.xlsx”; // Assuming we are running on a traditional environment, change that if on container

// Creating a new workbook

var wb = new XLWorkbook();

var worksheet = wb.Worksheets.Add(“DemoName”);

worksheet.Cell(1, 1).Value = “Hello”;

worksheet.Cell(1, 2).Value = “World”;

//Saving the workbook

wb.SaveAs(filePath);

Best regards,  
Maximilian

---

<div class="post-metadata">

**Author:** ![joy\_jiang](https://avatars.discourse-cdn.com/v4/letter/j/977dab/32.png) [@joy\_jiang](https://community.criticalmanufacturing.com/u/joy_jiang)\
**Post date:** [July 16, 2025, 12:35am UTC](https://community.criticalmanufacturing.com/t/i-want-to-use-dee-to-generate-excel-data-which-package-should-i-import/553/3 "2025-07-16T00:35:02Z")

</div>

I created the excel file successfully, thank you!

---

<div class="post-metadata">

**Author:** ![Joao\_Moreira](https://avatars.discourse-cdn.com/v4/letter/j/b9bd4f/32.png) [@Joao\_Moreira](https://community.criticalmanufacturing.com/u/Joao_Moreira)\
**Post date:** [July 16, 2025, 7:35pm UTC](https://community.criticalmanufacturing.com/t/i-want-to-use-dee-to-generate-excel-data-which-package-should-i-import/553/4 "2025-07-16T19:35:18Z")

</div>

Hi Joy,

I dont know your use case, but often a report within the system might fulfill your needs more effectively. Additionally, in V11.0+, you can leverage OData endpoints to extract data directly from MES, which offers a more integrated and programmatic approach.

Best regards,

João Moreira

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex050/user_avatar/community.criticalmanufacturing.com/system/32/23_2.png) [@system](https://community.criticalmanufacturing.com/u/system)\
**Post date:** [August 27, 2026, 5:41pm UTC](https://community.criticalmanufacturing.com/t/i-want-to-use-dee-to-generate-excel-data-which-package-should-i-import/553/5 "2026-08-27T17:41:16Z")

</div>

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