FUNCTION MAIN()
LOCAL oExcel := CREATEOBJECT( "Excel.Application" )
LOCAL oWorkbook := oExcel:Workbooks:Add()
LOCAL oSheet := oExcel:ActiveSheet
oSheet:Cells( 1, 1 ):Value = "Test 1A"
oSheet:Cells( 1, 2 ):Value = "Test 1B"
oSheet:Cells( 2, 1 ):Value = "Test 3A"
oSheet:Cells( 2, 2 ):Value = "Test 3B"
oSheet:Rows( 2 ):Insert()
oSheet:Cells( 2, 1 ):Value = "Test 2A"
oSheet:Cells( 2, 2 ):Value = "Test 2B"
oExcel:Visible = .T.
RETURN NIL
oExcel:Visible = .T.
oSheet:SaveAs( "c:\xharbour\newfile.xls" )
oExcel:Quit()
oSheet = oWorkSheets:Add()
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 97 guests