How to get Formatted data from C#

  • Thread starter Thread starter Marquis
  • Start date Start date
M

Marquis

I am writing a program to convert data from Excel to CSV. However, I
just get floating number and integer when getting cells with date
format or percentage. I want to get the same string as I can see in the
excel.

For example:
HK$50.00 in Excel's cell, I want to get the result of HK$50.00 but not
"50"

Is there any way i can do this?

Thanks,
Marquis
 
Marquis,

When you are getting the cell value from exchange, use the Text property
on the range, and not the Value property.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top