Read Excel cell as being displayed

Hi,

is it possible to get the text of a cell as it is displayed within Excel?

For example, postal codes must consist of five digits. If a customer enters '01234', Excel woud store this as the number 1234. The customer notices and 'corrects' this, selecting a number format of '000000'. This is displayed correctly by Excel, and I want to get the display string in this case.

Thanks,
Micha

Hi,
You can use xls.GetCellFromString to get the string as it is formatted in Excel.

Regards,
  Adrian.

Your answer puzzled me for a moment, but yes, GetStringFromCell works great.

Thanks again
Micha

Yes, sorry, I was just thinking about it moments ago. It is SetCellFromString/GetStringFromCell. I was thinking in SetCellFromString, that's why I got confused. Glad to know you found the right method anyway :)