thanks for the replies, i have only gotten to this now as i was out sick.
I have tried the suggestions but when i do all of the other fields with numeric values in them also get a € format attached to them. i have used
OleApp.cells(lnCounter,3).Select
OleApp.cells.NumberFormat = "[$€-2] #,##0.00"
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.
~M
>>hi all,
>>I have an app that creates an excel file and everything hunky dorey except one thing. the customer wants to see 2 decimal points in a numberic field and also a lead char of the euro sign. i have tried passing in the values below but all that shows up in excel is the value without the euro sign. has anyone any ideas? Idealy automatically formating the cell to numeric with 2 decimal places and using the euro symbol would be best i think but i don't know now to do it.
>>
>>"€ " + 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
Go raibh maith agat
~M