Skip to main content

Notifications

Finance | Project Operations, Human Resources, ...
Unanswered

Reading a cell value with Microsoft.Office.Interop.Excel in AX 2012

Posted on by 362

Hi Everyone,

I have a requirement to export the data to an Excel using Interop in AX 2012 as this will run in Batch. Below is the sample data which i have used to explain the scenario..

pastedimage1570979567893v1.png

Let say we have  two Students with a StartDate & EndDate, now the report labels has to been designed in the below manner where we consider least StartDate and maximum EndDate and set the labels.

ReportTemplate:

ExcelLabels.PNG

Here i am able to create the labels as required, but i need help to get the data of a particular month in the respective column. i.e..

For the first record, the data has to be inserted from Jan-2018 cell to Oct-2018 cell and for second record, it should insert from April-2018 to Dec-2019... To do so, i have to check the label month, i mean if i know which month & year are set on the label then i can fetch the record using that Date and set the values in the respective column.

I am not familiar with the Interop functions and need help for the given requirement where i can read the cell value(i.e.. Label Date) and use the same data to get the respective month data from the table.

I guess, we have to use get_Item() or get_Value() or any other function to read the cell value, please help me in providing a solution. Thank you in advance.

Vekat.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans