If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > How to Open XLS and XLT files using xharbour

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-13-06, 23:09
narcosis narcosis is offline
Registered User
 
Join Date: May 2006
Posts: 4
How to Open XLS and XLT files using xharbour

Hi!

Im trying to make an application in xharbour that will fill up cells in an Excel Workbook (XLS) and In an Excel TEmplate file (XLT)..

here's the code:

*----------------------------------------------------------------*
TRY
oExcel := GetActiveObject( "Excel.Application" )
CATCH
TRY
oExcel := CreateObject( "Excel.Application" )
CATCH
Alert( "ERROR! Excel not avialable. [" + Ole2TxtError()+ "]" )
RETURN
END
END

oExcel:Workbooks:Open("RB-SOLO-COCE.xlt")
*----------------------------------------------------------------*

the problem is i get this error message at run time:

Error Excel.Application:WORKBOOKS/16389 E_FAIL: OPEN Arguments: ( [ 1] = Type: C Val: RB-SOLO-COCE.xlt)
Error at ...: TOLEAUTO:OPEN(0) in Module: win32ole.prg
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On