
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)AX7 contains the EPPlus framework which is considered the replacement to SysExcel*. You should be able to find examples in the existing code base.