oExcel = CREATEOBJECT([Excel.Application]) oExcel.SheetsInNewWorkbook = 4 oWorkbook = oExcel.Workbooks.Add() oExcel.Visible = .t. oExcel.activesheet.Range("B"+TRIM(PADR(nrow,11))).Font.Size = 10 oExcel.activesheet.Range("B"+TRIM(PADR(nrow,11))).HorizontalAlignment = xlHAlignLeft oExcel.activesheet.Range("B"+TRIM(PADR(nrow,11))).value = rpt012->invnoBut it show out the numeric format value 234567,
oExcel.activesheet.Range("B"+TRIM(PADR(nrow,11))).NumberFormat = [0000000000]The cell can dispay 000234567, but the cell is still in numeric format.