I tried an example excel automation using some code posted to this
newsgroup. However the last line in the code below results in a walkback. Any suggestions? excel := Xl_Application new. books := excel workbooks. book := books add: VARIANT unspecified lcid: 0. "Make the sheet visible" excel visible: 0 rhs: true. "set caption" caption := 'Act Targets'. excel caption: caption. "Add a sheet title" range := excel range: 'A1' cell2: VARIANT unspecified. range value: caption. 9:55:30, Friday, July 05, 2002: 'HRESULT Error: Type mismatch. (FACILITY_DISPATCH)' XlRange(IDispatch)>>invokeId:flags:parms:retVal: XlRange(IDispatch)>>invokeId:flags:parms: XlRange(IDispatch)>>getPropertyId:item: XlRange>>value: UndefinedObject>>{unbound}doIt CompiledExpression>>value: SmalltalkWorkspace>>evaluateRange:ifFail:debug: SmalltalkWorkspace>>evaluateItIfFail:debug: SmalltalkWorkspace>>evaluateItIfFail: SmalltalkWorkspace>>evaluateIt Symbol>>forwardTo: [] in Command>>value BlockClosure>>ifCurtailed: BlockClosure>>ensure: Command>>value SmalltalkWorkspaceDocument(Shell)>>performCommand: CommandQuery>>perform DelegatingCommandPolicy(CommandPolicy)>>route: [] in ShellView(View)>>onCommand: BlockClosure>>ifCurtailed: BlockClosure>>ensure: Cursor>>showWhile: ShellView(View)>>onCommand: ShellView(View)>>wmCommand:wParam:lParam: ShellView(View)>>dispatchMessage:wParam:lParam: [] in InputState>>wndProc:message:wParam:lParam:cookie: BlockClosure>>ifCurtailed: ProcessorScheduler>>callback:evaluate: InputState>>wndProc:message:wParam:lParam:cookie: ShellView>>translateAccelerator: ShellView>>preTranslateKeyboardInput: ShellView(View)>>preTranslateMessage: InputState>>preTranslateMessage: InputState>>pumpMessage: InputState>>loopWhile: InputState>>mainLoop [] in InputState>>forkMain ExceptionHandler(ExceptionHandlerAbstract)>>markAndTry [] in ExceptionHandler(ExceptionHandlerAbstract)>>try: BlockClosure>>ifCurtailed: BlockClosure>>ensure: ExceptionHandler(ExceptionHandlerAbstract)>>try: BlockClosure>>on:do: [] in BlockClosure>>newProcess |
Frank,
Just tried it with Dolphin 5 and it works, no walkback... Pieter "Frank Sonnemans" <[hidden email]> wrote in message news:ag3jgr$13mbp$[hidden email]... > I tried an example excel automation using some code posted to this > newsgroup. However the last line in the code below results in a walkback. > Any suggestions? > > excel := Xl_Application new. > > books := excel workbooks. > > book := books add: VARIANT unspecified lcid: 0. > > "Make the sheet visible" > > excel visible: 0 rhs: true. > > "set caption" > > caption := 'Act Targets'. > > excel caption: caption. > > "Add a sheet title" > > range := excel range: 'A1' cell2: VARIANT unspecified. > > range value: caption. > > > > > 9:55:30, Friday, July 05, 2002: 'HRESULT Error: Type mismatch. > (FACILITY_DISPATCH)' > XlRange(IDispatch)>>invokeId:flags:parms:retVal: > XlRange(IDispatch)>>invokeId:flags:parms: > XlRange(IDispatch)>>getPropertyId:item: > XlRange>>value: > UndefinedObject>>{unbound}doIt > CompiledExpression>>value: > SmalltalkWorkspace>>evaluateRange:ifFail:debug: > SmalltalkWorkspace>>evaluateItIfFail:debug: > SmalltalkWorkspace>>evaluateItIfFail: > SmalltalkWorkspace>>evaluateIt > Symbol>>forwardTo: > [] in Command>>value > BlockClosure>>ifCurtailed: > BlockClosure>>ensure: > Command>>value > SmalltalkWorkspaceDocument(Shell)>>performCommand: > CommandQuery>>perform > DelegatingCommandPolicy(CommandPolicy)>>route: > [] in ShellView(View)>>onCommand: > BlockClosure>>ifCurtailed: > BlockClosure>>ensure: > Cursor>>showWhile: > ShellView(View)>>onCommand: > ShellView(View)>>wmCommand:wParam:lParam: > ShellView(View)>>dispatchMessage:wParam:lParam: > [] in InputState>>wndProc:message:wParam:lParam:cookie: > BlockClosure>>ifCurtailed: > ProcessorScheduler>>callback:evaluate: > InputState>>wndProc:message:wParam:lParam:cookie: > ShellView>>translateAccelerator: > ShellView>>preTranslateKeyboardInput: > ShellView(View)>>preTranslateMessage: > InputState>>preTranslateMessage: > InputState>>pumpMessage: > InputState>>loopWhile: > InputState>>mainLoop > [] in InputState>>forkMain > ExceptionHandler(ExceptionHandlerAbstract)>>markAndTry > [] in ExceptionHandler(ExceptionHandlerAbstract)>>try: > BlockClosure>>ifCurtailed: > BlockClosure>>ensure: > ExceptionHandler(ExceptionHandlerAbstract)>>try: > BlockClosure>>on:do: > [] in BlockClosure>>newProcess > > > |
I accidently opened Dolphin 4 where the method value2: instead of value:
works. In Dolphin 5 it works fine without this modification. Thanks for trying it out. Regards, Frank "Pieter Emmelot" <[hidden email]> wrote in message news:[hidden email]... > Frank, > > Just tried it with Dolphin 5 and it works, no walkback... > > Pieter > > "Frank Sonnemans" <[hidden email]> wrote in message > news:ag3jgr$13mbp$[hidden email]... > > I tried an example excel automation using some code posted to this > > newsgroup. However the last line in the code below results in a > > Any suggestions? > > > > excel := Xl_Application new. > > > > books := excel workbooks. > > > > book := books add: VARIANT unspecified lcid: 0. > > > > "Make the sheet visible" > > > > excel visible: 0 rhs: true. > > > > "set caption" > > > > caption := 'Act Targets'. > > > > excel caption: caption. > > > > "Add a sheet title" > > > > range := excel range: 'A1' cell2: VARIANT unspecified. > > > > range value: caption. > > > > > > > > > > 9:55:30, Friday, July 05, 2002: 'HRESULT Error: Type mismatch. > > (FACILITY_DISPATCH)' > > XlRange(IDispatch)>>invokeId:flags:parms:retVal: > > XlRange(IDispatch)>>invokeId:flags:parms: > > XlRange(IDispatch)>>getPropertyId:item: > > XlRange>>value: > > UndefinedObject>>{unbound}doIt > > CompiledExpression>>value: > > SmalltalkWorkspace>>evaluateRange:ifFail:debug: > > SmalltalkWorkspace>>evaluateItIfFail:debug: > > SmalltalkWorkspace>>evaluateItIfFail: > > SmalltalkWorkspace>>evaluateIt > > Symbol>>forwardTo: > > [] in Command>>value > > BlockClosure>>ifCurtailed: > > BlockClosure>>ensure: > > Command>>value > > SmalltalkWorkspaceDocument(Shell)>>performCommand: > > CommandQuery>>perform > > DelegatingCommandPolicy(CommandPolicy)>>route: > > [] in ShellView(View)>>onCommand: > > BlockClosure>>ifCurtailed: > > BlockClosure>>ensure: > > Cursor>>showWhile: > > ShellView(View)>>onCommand: > > ShellView(View)>>wmCommand:wParam:lParam: > > ShellView(View)>>dispatchMessage:wParam:lParam: > > [] in InputState>>wndProc:message:wParam:lParam:cookie: > > BlockClosure>>ifCurtailed: > > ProcessorScheduler>>callback:evaluate: > > InputState>>wndProc:message:wParam:lParam:cookie: > > ShellView>>translateAccelerator: > > ShellView>>preTranslateKeyboardInput: > > ShellView(View)>>preTranslateMessage: > > InputState>>preTranslateMessage: > > InputState>>pumpMessage: > > InputState>>loopWhile: > > InputState>>mainLoop > > [] in InputState>>forkMain > > ExceptionHandler(ExceptionHandlerAbstract)>>markAndTry > > [] in ExceptionHandler(ExceptionHandlerAbstract)>>try: > > BlockClosure>>ifCurtailed: > > BlockClosure>>ensure: > > ExceptionHandler(ExceptionHandlerAbstract)>>try: > > BlockClosure>>on:do: > > [] in BlockClosure>>newProcess > > > > > > > > |
Free forum by Nabble | Edit this page |