Hi!
A friend asked me how to format some cell's as text.
He needs to store some cells with some values that can be numeric, alplanumeric ou text like: "0345", "34e12" or "a345"
The main problem is that another software his client has will read those values and it only understand those value as text, so it's not allowed to use a apostrophe in front of any value, because it would change the value for the other software.
I tried to format the cell in a test
oExcel = CreateObject("Excel.Application")
oExcel.Visible = .T.
oBook = oExcel.Workbooks.Add()
oExcel.ActiveSheet.Range("C14").NumberFormat = "00000000000000"
oExcel.ActiveSheet.Range("C14").Value = "05041910505374"
oExcel.ActiveSheet.Range("C15").NumberFormat = "00000000000000"
oExcel.ActiveSheet.Range("C15").Value = "05044"
In this case the propertie NumberFormat doesnt work
Is there another solution form this problem.
Any Ideas?
TIA
Peter