Read from XLS

Post Reply
User avatar
cdmmaui
Posts: 653
Joined: Fri Oct 28, 2005 9:53 am
Location: The Woodlands - Dallas - Scottsdale - London
Contact:

Read from XLS

Post by cdmmaui »

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
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Read from XLS

Post by Enrico Maria Giordano »

Code: Select all

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
cdmmaui
Posts: 653
Joined: Fri Oct 28, 2005 9:53 am
Location: The Woodlands - Dallas - Scottsdale - London
Contact:

Post by cdmmaui »

Thank You Enrico
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
Patrick Mast
Posts: 244
Joined: Sat Mar 03, 2007 8:42 pm

Re: Read from XLS

Post by Patrick Mast »

Hey Darrell,

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

;-)

Patrick
Post Reply