Read from XLS
Posted: 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?
www.FiveTechSoft.com
https://fivetechsoft.com/forums/
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