oSheet:Cells( nRow, 1 ):Value := "12345"
oSheet:Cells( nRow, 1 ):Value := "'12345"
#define xlRight -4152
FUNCTION MAIN()
LOCAL oExcel, oSheet
oExcel = CREATEOBJECT( "Excel.Application" )
oExcel:WorkBooks:Add()
oSheet = oExcel:ActiveSheet
oSheet:Cells( 1, 1 ):Value = "This is a test"
oSheet:Cells( 2, 1 ):Value = "This is a long test"
oSheet:Cells( 3, 1 ):Value = "12345"
oSheet:Columns( "A:B" ):AutoFit()
oSheet:Columns( "A:B" ):HorizontalAlignment = xlRight
oExcel:Visible = .T.
RETURN NIL
Rick Lipkin wrote:Enrico
Bad news .... the loader see's the ( ole ) reg_no column as a double type ..
Rick Lipkin wrote:For some odd reason .. Excel formats the reg_no column as numeric even though it containes both charactor and numeric ?? The sql loader is configured a varchar.
oSheet:Range( "A:A" ):Set( "NumberFormat", '@' )
// then the follwing would be text and not numeric
oSheet:Cells( 1, 1 ):Value = "12345"
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 83 guests