>OleApp.cells(lnCounter,3).Select && selects the individual cell >OleApp.cells.NumberFormat = "[$€-2] #,##0.00" && change the format of cell >Try:
OleApp.cells(lnCounter,3).NumberFormat = "[$€-2] #,##0.00" && change the format of cellCetin
>OleApp.cells(lnCounter,3).Select && selects the individual cell >OleApp.cells.NumberFormat = "[$€-2] #,##0.00" && change the format of cell >>i have also used
>...
>OleApp.cells.NumberFormatLocal = "[$€-2] #,##0.00"
>
>with the same results. the other fileds that are converted to numberic format are on other lines of the excel sheet, some well before these lines and some afterwards.>>>"€ " + ALLTRIM(STR(mvalue,9,2)) >>>>>>~M
NumberFormat = "[$€-2] #,##0.00"
>>ie:lcSQL = 'select product_id,quantity,unit_price,quantity*unit_price as extPrice from orditems' >>lcConnPath = _samples+'data\testdata.dbc' >>lcConnectionString = [OLEDB;Provider=VFPOLEDB;Data Source=]+m.lcConnPath >> >>* Create and save XLS once >>oExcel = Createobject('Excel.Application') >>With oExcel >> .Visible = .t. >> .Workbooks.Add >> With .ActiveWorkbook.ActiveSheet >> .QueryTables.Add( m.lcConnectionString, ; >> .Range("A1"),; >> m.lcSQL).Refresh >> .UsedRange.Columns(4).NumberFormat = "[$€-2] #,##0.00" >> EndWith >>EndWith >>Cetin