OLE Control: "Microsoft Excel 14.0 Object Library"

Askaron
Member Posts: 4
Hi experts,
I have a problem with a report. I would export the content from 4 tables in 1 Excel File with 4 Sheets.
With the standard functions include in Excel Buffer (370) it don't work because there don't have a "AddSheet" function.
So now I would try it with Automation. I use Dynamics NAV 2009 and Excel 2010.
My Report would use the Microsoft Excel 14.0 Object Library. I write a litte piece of code if the connection between NAV and Excel works:
I get this Error Message:
I find some help by Dr. Google and mibuso but nothing works. I installed the VB6.0-KB290887-X86.exe --> don't work.
I registered the NShandler.dll (or somethink like this) --> don't work.
And now, I need your help to solve it.
Thanks for any suggestions.
EDIT: It's strange, if I check the standard Excel Buffer functions like "CreateBook" it's work. In Globals it's show me as a Unknown Automation server and the ID ist for the Excel 8.0 Library. Why this works? Strange...
EDIT 2: I forgot to say, with our license I can't create a new function in the Excel Buffer table. This was my first idea.
EDIT 3: Oh my god, i used the "Microsoft Excel 14.0 Object Library"._Application instead of the *.Application without underscore. And now i don't get thsi error message above, but my IF Clause say: Excel don't found.
EDIT 4: Okay, now it works. With this code in the "On Post Data Item" Trigger:
I have a problem with a report. I would export the content from 4 tables in 1 Excel File with 4 Sheets.
With the standard functions include in Excel Buffer (370) it don't work because there don't have a "AddSheet" function.
So now I would try it with Automation. I use Dynamics NAV 2009 and Excel 2010.
My Report would use the Microsoft Excel 14.0 Object Library. I write a litte piece of code if the connection between NAV and Excel works:
CREATE(XlApp,TRUE,TRUE); IF NOT CREATE(XlApp,TRUE,TRUE) THEN BEGIN ERROR(Text000); END ELSE BEGIN ERROR(Text001); END;
I get this Error Message:
Could not create an instance of the OLE control or Automation server identified by [..]
Check that the OLE control or Automation server is correctly installed and registred.
I find some help by Dr. Google and mibuso but nothing works. I installed the VB6.0-KB290887-X86.exe --> don't work.
I registered the NShandler.dll (or somethink like this) --> don't work.
And now, I need your help to solve it.
Thanks for any suggestions.
EDIT: It's strange, if I check the standard Excel Buffer functions like "CreateBook" it's work. In Globals it's show me as a Unknown Automation server and the ID ist for the Excel 8.0 Library. Why this works? Strange...
EDIT 2: I forgot to say, with our license I can't create a new function in the Excel Buffer table. This was my first idea.

EDIT 3: Oh my god, i used the "Microsoft Excel 14.0 Object Library"._Application instead of the *.Application without underscore. And now i don't get thsi error message above, but my IF Clause say: Excel don't found.
EDIT 4: Okay, now it works. With this code in the "On Post Data Item" Trigger:
IF ISCLEAR(XlApp) THEN CREATE(XlApp); IF NOT CREATE(XlApp,TRUE,TRUE) THEN BEGIN ExcelBuffer.CreateBook(); ExcelBuffer.CreateSheet(TABLECAPTION,TABLECAPTION,COMPANYNAME,USERID); END;
- Also on http://www.msdynamics.de -
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions