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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

OpenXML in AX2012

(0) ShareShare
ReportReport
Posted on by

Hi there,

I want to use OpenXML for a Excel export in AX2012. The OpenXML assembly reference is registered in my AOT.

So i found heaps of examples using C# - how can i transition them to X++? I know i have to use full qualified names, but still X++ gives me

Syntax errors, e.g.:

DocumentFormat.OpenXml.Packaging.SpreadsheetDocument    spreadSheet;
DocumentFormat.OpenXml.SpreadsheetDocumentType          doctype;  
spreadSheet = DocumentFormat.OpenXml.Packaging.SpreadsheetDocument.Create(filename, doctype, true) 

Also, how do i deal with the generics used in C#?

I'm new to AX, so please give a detailed description of your solutions. Thanks in advance!

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Zain Bokhari Profile Picture
    3,208 Moderator on at

    Hi,

    I think this link might help you resolve your errors.

  • Community Member Profile Picture
    on at

    Thanks for your answer. This already helped me a lot, I'm still struggling to create a working example though.

    Do you have a example for just a basic file with one sheet and some data for me? Thanks alot in advance.

  • Martin Dráb Profile Picture
    238,147 Most Valuable Professional on at

    I provided a trivial example in a similar thread, Create/Read/Write Word Document using Open XML.

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

News and Announcements

Season of Giving Solutions is Here!

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#2
TAHER Mehdi Profile Picture

TAHER Mehdi 3

#3
Nakul Profile Picture

Nakul 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans