News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Improved Excel Host

Started by Biterider, February 13, 2006, 09:13:55 AM

Previous topic - Next topic

Biterider

Hi
I was working the last time on the Excel COM interface for a specific application. As a result I developed an ExcelHost object that handles all the COM stuff making it easy to communicate with the Excel application.
If somebody is interested in the complete source and/or further develope it, contact me.
Attached a little demo showing its current capabilities.

Biterider

[attachment deleted by admin]

PBrennick

BiteRider,
A small problem, perhaps?  I get a message that says 'Registration Error!  Start DebugCenter manuall...'
Then when I close that message box, the app crashes and I need to click 'Don't send' (to Microsoft).

What gives?  XP, HE, SP2,
Paul
The GeneSys Project is available from:
The Repository or My crappy website

Vortex

Hi Biterider,

I receive the same registration error message. After clicking OK in the message box displaying the error message, your application runs successfully Excel and it displays Hello Excel.

Nice work :U

OS : Win Xp HE Sp2

P1

Paul,

I updated my ObjAsm32 from Biterider's website and errors will go away.

That will get the demo to work.

I am working on a successful build right now, but having a couple of things to work out for my setup.

Regards,  P1  :8)

Biterider

Hi,
If you don't have installed the ObjAsm32 package, then you don't have the DebugCenter application installed. For the ExcelHost application, it only shows the returning values from Excel on a separate debug window.
If you have the package installed, then start the DebugCenter by clicking on the DebugCenter.exe. It is placed on the projects folder. Once it runs one time, it saves the necessary information and the dialog you told me doesn't appear any more.

Biterider

PBrennick

Sorry, my mistake.  I thought it was a stand-alone application.  I think I will pass.  I have enough things running as it is but good luck with your app.

Paul
The GeneSys Project is available from:
The Repository or My crappy website

Biterider

Hi
I disabled the debug code generation and recompiled the .exe. I was really surprised to see that its size has only 10kB!

Biterider


[attachment deleted by admin]

P1

Biterider,

Here is the output of your make file.  I was going to run through the code and adjust it myself.  It helps me learn from others, but I have a deadline to make, so I thought I would give you the output as I finish my other project.

Regards,  P1  :8)

Make.txt  ( 1.3e installed ) Assembling: ExcelHost.asm
DEBUG MODE  : ACTIVE
OOP LEVEL   : PRIMER ONLY
- Primer.inc

Inheritance path: Primer
C:\Masm32\ObjAsm32\Code\COM\COM_Dispatch.asm(29) : error A2005: symbol redefinition : ExecDispatch
C:\Masm32\ObjAsm32\Code\COM\COM_Dispatch.asm(31) : error A2012: PROC, MACRO, or macro repeat directive must precede LOCAL
C:\Masm32\ObjAsm32\Code\COM\COM_Dispatch.asm(32) : error A2012: PROC, MACRO, or macro repeat directive must precede LOCAL
C:\Masm32\ObjAsm32\Code\COM\COM_Dispatch.asm(87) : error A2006: undefined symbol : ??0AD7
MacroLoop(68): iteration 5: Macro Called From
  $PushMethodArgs(93): Macro Called From
   ICall(19): Macro Called From
    C:\Masm32\ObjAsm32\Code\COM\COM_Dispatch.asm(87): Include File
C:\Masm32\ObjAsm32\Code\COM\COM_Dispatch.asm(87) : error A2006: undefined symbol : ??0AD7
MacroLoop(68): iteration 8: Macro Called From
  $PushMethodArgs(93): Macro Called From
   ICall(19): Macro Called From
    C:\Masm32\ObjAsm32\Code\COM\COM_Dispatch.asm(87): Include File
C:\Masm32\ObjAsm32\Code\COM\COM_Dispatch.asm(112) : fatal error A1010: unmatched block nesting : ExecDispatch

Biterider

Hi P1
I guess that the problem is the COM_Dispatch.inc file. You are probably using the file from the package. Replace it with the file I posted above. Basically I split the original file in 2 (.asm and .inc files) to avoid code duplication.

Biterider

P1

Quote from: Biterider on February 14, 2006, 03:58:33 PMI guess that the problem is the COM_Dispatch.inc file. You are probably using the file from the package.
Your right, the 1.3e upgrade over-wrote COM_Dispatch.inc in the COM directory.  I put back the project file and everything assembled just fine.

Is this file backwards compatable with older source code ?

Regards,  P1  :8)

Biterider

Hi P1
The file(s) can be used without problems with older code.

Biterider

Biterider

Hi
I'm still working on the ExcelHost. I was exploring how to create charts and it is easier than expected.
Attached is an example.

Biterider


[attachment deleted by admin]

Biterider

Hi
Range and Chart formatting is ready. I found it very interesting how well organized the Excel object model is. I.e., all border or interior object settings can be done using the same method, regardless of the object type.
An issue I found is using colors. Even if you pass an RGB color, Excel seems to use the colors of its internal palette.

Regards

Biterider

[attachment deleted by admin]