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

Excel File Handler in AX7?

(0) ShareShare
ReportReport
Posted on by

Hey guys, 

I was thinking if there exists a class that would handle excel files (.xls, .xlsx, .csv, etc) in AX7.

I have used SysExcel* classes in AX2012 and I believe they don't exist in AX7. Furthermore, I read that we have OfficeOpenXml namespace from C# that we could use to handle excel files using a combination of .ExcelRange, .ExcelWorksheet, .ExcelPackage, etc.

Even though I am not having any problem (since I handled my requirement using OfficeOpenXml namespace), I was wondering would it be a wise option to implement a read/write/iterating class just to handle Excel files in AX7 for a long run? 

Sample code to handle Excel files would be as and could be used for many purposes (temporary storing in array, database operations, parsing, and much more):

ExcelFileHandler excelFileHandler = new ExcelFileHandler(ExcelFileHandler::getExcelRegex());
                
System.IO.Stream stream = result.openResult();
                
excelFileHandler.setStream(stream, result.getFileName());
excelFileHandler.readData(true);

while (excelFileHandler.hasNext())
{
    info(excelFileHandler.current());
    excelFileHandler.getNext();
}

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Joris dG Profile Picture
    17,775 on at

    AX7 contains the EPPlus framework which is considered the replacement to SysExcel*. You should be able to find examples in the existing code base.

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

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans