Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Dll intialization issue?

(0) ShareShare
ReportReport
Posted on by

Hi,

i have below code 

IF ISNULL(xlApp) THEN
xlApp := xlApp.ApplicationClass;
BEGIN
NoOfRows := CreateFile(VarAnalysisViewCodeLoc,VarShowBasicPeriod,
Rec_Prov,Rec, Sign, PeriodType-1, ShowName, GLAccFilter, Dim1Filter, Dim2Filter,
DateFilter, EmployeeFilter, ShowOnlyEmployees, AmountType);

and when i run this i got an below error.

Microsoft Dynamics NAV
---------------------------

Cannot create an instance of the following .NET Framework object: assembly Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c,
type Microsoft.Office.Interop.Excel.ApplicationClass.
---------------------------
OK
---------------------------

and my dll variable is 

Name  DataType  Subtype     Length
xlApp  DotNet    Microsoft.Office.Interop.Excel.ApplicationClass.'Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'

Can any one suggest me to achive this one.

Thanks in advance.

Ramesh

--

*This post is locked for comments

  • Corrado Lembo Profile Picture
    15 on at
    RE: Dll intialization issue?

    Problem is on code:

    xlApp := xlApp.ApplicationClass;

    RunOnClient Property is set to true.

    Thanks

  • Suggested answer
    RockwithNav Profile Picture
    6,851 on at
    RE: Dll intialization issue?

    Make Sure RunOnClient Property is set to true.

    Which Line of code is giving this Error?

  • Corrado Lembo Profile Picture
    15 on at
    RE: Dll intialization issue?

    Do you have solved?

    I've same issue but run on client not solve it.

  • Suggested answer
    Suresh Kulla Profile Picture
    47,789 on at
    RE: Dll intialization issue?

    Set RunonClient property to yes for the variable and try.

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics NAV (Archived)

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2

#1
mmv Profile Picture

mmv 2

#1
Amol Salvi Profile Picture

Amol Salvi 2

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans