Notifications
Announcements
No record found.
Hi Experts,
Can anyone help me with sample code which would read entire excel workbook (as it is all sheets in workbook i cannot use dixif) from a particular network drive path on periodic basis & populate data into ax table.
I think SysExcel class wont work as that will work at client level only.
Thank
Mav
You can use ExcelPackage class from OfficeOpenXml namespace. You can find plenty of examples on the internet; some of them are even for AX 2012.
I think you could also process the file with DIXF, just not at once, but a single worksheet at a time.
My 1st preference is DIxif & hence wanted to check if you can pls elaborate on
"I think you could also process the file with DIXF, just not at once, but a single worksheet at a time."
Scenario
1 excel workfbook - multiple sheets all of this data to go into 1 single custom entity in Ax2012 via batch job i.e. minimum user intervention.
If you know how to import a single worksheet (and how you select which one), what is preventing your from importing multiple worksheets one by one?
Yes another approach would be transforming the file before importing.
So what is stopping me is the error that entity A is already used which i get when adding entity A again in 2nd line for sheet 2.
How can i overcome this in processing group form.
Then you would need multiple projects.
I personally wouldn't do it, though. Having an extra step transforming the file to something that you can easily import sounds much easier to me.
This is in Ax2012 can you share some sample code or reference where I can address below scenario.
read excel workbook (all sheets) periodically from a folder
enter that data into ax table
Don't try to solve all problem at once. Let's focus on reading the file for now and if you don't know how to work with AX tables, let's address that later.
Does it mean that you rejected both transforming the file and using ExcelPackage to import the file? Then you can surely find some other libraries, but you should explain why you rejected this one, so we can suggest something more suitable for you.
Or does it mean that you don't know how to use ExcelPackage and you simply gave up? Do you have any particular problem? Did you look at examples on the internet?
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 584 Most Valuable Professional
André Arnaud de Cal... 499 Super User 2025 Season 2
Sohaib Cheema 254 User Group Leader