xbrowse to excel office 2010

xbrowse to excel office 2010

Postby Richard Chidiak » Wed Jun 01, 2011 10:10 am

Hello

oBrw:lExcelCellwise := .t.
OBRW:TOEXCEL()

makes the computer hang ,

This occurs since i updated to fwh 11.04

Using office 2010

Anyone else experiencing this ?

Thanks for the help

PS : resetting back my xbrowse.prg from fwh 10.10 (previous version i used) , it works as expected
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: xbrowse to excel office 2010

Postby nageswaragunupudi » Wed Jun 01, 2011 11:56 am

May I know what version of Harbour / XHarbour (Free) / xHb commecial and the compiler are you using please?

Specifically, are you using xharbour commercial?
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10685
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xbrowse to excel office 2010

Postby Richard Chidiak » Wed Jun 01, 2011 12:11 pm

I am using bcc 5.82 and xharbour from fivetech version 1.2.1
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: xbrowse to excel office 2010

Postby nageswaragunupudi » Wed Jun 01, 2011 2:49 pm

Can you please try this simple program and post the result here?
Code: Select all  Expand view  RUN
#include 'fivewin.ch'

function main()

   local oExcel

   msginfo( 'Before ExcelObj()' )
   oExcel   := ExcelObj()  // is the program hanging here?
   msginfo( 'After ExcelObj()' )
   msginfo( ValType( oExcel ), 'ValType of Object' )

return 0

Let us see if the program is hanging at this function call.

Note: I have only Office2007. Request you to help testing on Office2010
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10685
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xbrowse to excel office 2010

Postby Otto » Wed Jun 01, 2011 3:02 pm

Dear Mr. Rao,
your code is working fine here.
Richard, please have a look to:
viewtopic.php?f=3&t=18483&p=96817&hilit=office#p96817

Did you install Office as usual or did you use the Click-to-Run option?

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6362
Joined: Fri Oct 07, 2005 7:07 pm

Re: xbrowse to excel office 2010

Postby Richard Chidiak » Wed Jun 01, 2011 3:25 pm

Mr Rao,

   msginfo( 'Before ExcelObj()' )
   oExcel   := ExcelObj()  // is the program hanging here?

yes it is hanging here

If i can help further, let me know

I have put back my xbrowse.prg from fwh 10.10 and everything works as expected

Otto

I have complete office 2010 professional, and the problem occured when i upgraded from fwh 10.10 to 11.04

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: xbrowse to excel office 2010

Postby nageswaragunupudi » Wed Jun 01, 2011 3:41 pm

This is working fine for Mr.Otto but not for you. The problem is not because of the version of Office.

Please open \fwh\source\function\olefuncs.prg.
First function is GetOleObject( cApp )
Code: Select all  Expand view  RUN

function GetOleObject( cApp )

   local oObj

   TRY
      oObj  := GetActiveObject( cApp )
   CATCH
      TRY
         oObj  := CreateObject( cApp )
      CATCH
      END
   END

return oObj
 

This function is reported to hanging with xHarbour commerical. Probably it may be hanging with your version of xHarbour too.

Please try substituing the function with the following function
Code: Select all  Expand view  RUN

function GetOleObject( cApp )

   local oObj

   TRY
      oObj  := TOleAuto():New( cApp )
   CATCH
   END

return oObj
 

Compile the program and link the object file with your above sample code.
Please let us know if the sample program is working or still hanging.

This work around solved the problem for some users.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10685
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xbrowse to excel office 2010

Postby Richard Chidiak » Wed Jun 01, 2011 3:50 pm

It works ok with these changes

I do not update to xharbour's actual version because there is a bug with "copy to" and my application uses this syntax in some cases

Thanks for your help,
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: xbrowse to excel office 2010

Postby nageswaragunupudi » Wed Jun 01, 2011 4:09 pm

Good to know.

Can you still help me more? It is desirable to know where exactly the code is hanging, so that we can think of a solution that works for all.

Can you substitute GetOleObject() function with this modification and see where it is failing or hanging?

Code: Select all  Expand view  RUN

function GetOleObject( cApp )

   local oObj

   TRY
      msginfo( 'Before GetActiveObject' )
      oObj  := GetActiveObject( cApp )
      msginfo( 'GetActiveObject() succeeded' )
   CATCH
      msginfo( 'GetActiveObject() failed' )
   END
   if oObj == nil  
      TRY
         msginfo( 'Before CreateObject()' )
         oObj  := CreateObject( cApp )
         msginfo( 'CreateObj() succeeded' )
      CATCH
         msginfo( 'CreateObj() failed' )
      END
   endf

return oObj
 


Once please test after booting computer.
Second time, first open Excel normally and then run the program while excel is still running.

I would be glad if you can post the test results.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10685
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xbrowse to excel office 2010

Postby Richard Chidiak » Thu Jun 02, 2011 1:57 pm

Mr Rao

in both cases only one message, the very first one Before GetActiveObject

It is displayed for ever , like in an endless loop , i have to stop the program from the task manager

Hth

Regards,
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Antonio Linares and 28 guests