FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Excel : errors
Posts: 166
Joined: Wed Aug 29, 2012 08:25 AM
Excel : errors
Posted: Tue Oct 30, 2012 11:22 AM
Hello,

I have an aplication where the user can print to a excel-file. It has always worked without problems.

The last months i got many errors , while i didn't changed nothing in the source related to excel.

As an example :

Code (fw): Select all Collapse
oExcel        := CreateObject( "Excel.Application" )
oWorkBook := oExcel:WorkBooks:Add()
IF ! IsNil(oExcel)
  nSheets := oExcel:Sheets:Count()   ==> ERROR !!
END


Error description: Error Excel.Application:ACTIVESHEET:_VALUE/0 S_OK: SHEETS
Called from: => TOLEAUTO:SHEETS( 0 )
Called from: B:\HENWINNEW\PRINTSYSA.PRG => STARTPRINTER( 725 )

Another example :
oSheed := oExcel:Get( "ActiveSheet" )
oSheed:Cells(nRij,nKol):Value := "test"
Error description: Error 2256468/424 Unknown error: CELLS
Args:
[ 1] = N 1
[ 2] = N 3
Called from: => TOLEAUTO:CELLS( 0 )

Testing on a computer from 5 years ago , i have no problems , but mine customers can not use excel anymore

Frank
test
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Excel : errors
Posted: Tue Oct 30, 2012 03:16 PM

Try to reinstall Office.

EMG

Posts: 166
Joined: Wed Aug 29, 2012 08:25 AM
Re: Excel : errors SOLVED
Posted: Tue Oct 30, 2012 03:23 PM

Changing oExcel:GET("ActiveSheet") in oExcel:Activesheet seems to solve the problem.

Probably oExcel:GET("ActiveSheet") works in XHB (commercial) , not with BCC

Frank

test

Continue the discussion