Read from XLS

Read from XLS

Postby cdmmaui » Thu May 22, 2008 7:53 pm

Can anyone provide sample code that reads values from an excel spreadsheet that can be stored to a variable?
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Re: Read from XLS

Postby Enrico Maria Giordano » Thu May 22, 2008 7:58 pm

Code: Select all  Expand view
FUNCTION MAIN()

    LOCAL oExcel := CREATEOBJECT( "Excel.Application" )

    LOCAL oSheet

    oExcel:WorkBooks:Open( "E:\XHARBOUR\TEST.XLS" )

    oSheet = oExcel:ActiveSheet

    ? oSheet:Cells( 1, 1 ):Value
    ? oSheet:Cells( 2, 1 ):Value
    ? oSheet:Cells( 3, 1 ):Value

    ? oSheet:Range( "A1" ):Value

    oExcel:Quit()

    RETURN NIL


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby cdmmaui » Sat May 24, 2008 2:18 am

Thank You Enrico
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong

Re: Read from XLS

Postby Patrick Mast » Sat May 24, 2008 8:29 am

Hey Darrell,

Is that picture-logo you use here the Brooks and Dunn logo?

;-)

Patrick
User avatar
Patrick Mast
 
Posts: 246
Joined: Sat Mar 03, 2007 8:42 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 92 guests