oExcel=createobject('Excel.Application') oexcel.visible = .t. oexcel.Workbooks.add test1 = oexcel.cells(10,10) ? type('test1') && RETURNED O which is what I expected oexcel.cells(10,10).numberformat = "@" oexcel.cells(10,10).value='test1' * ^^^ Note that having this value you may reference to the memory variable Test1 which you change from cell object, to cell contents ? type('oexcel.cells(10,10).value') * ^^^ Returns type of the contents of the Excel cell, and not the type of the variable with name contained in the Excel cell test1 = oexcel.cells(10,10).value && From here Test1 contains the value of the cell ? type('test1') &&RETURNED C ? iif(type('test1')='C','CHARACTER','SOMETHING ELSE') &&RETURNED CHARACTER ? type('test1') ? type('oexcel.cells(10,10).value')Hope this helps
Make solutions, not programs!