View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
news.microsoft.com[_10_] news.microsoft.com[_10_] is offline
external usenet poster
 
Posts: 3
Default Converting Data Types

Nevermind... All I had to do was reassign the same value to the cell after setting the NumberFormat property.
"news.microsoft.com" wrote in message ...
I'm dumping data into an Excel sheet via DTS from SQL Server. But I can't figure out how to get the numbers to come across as numbers. They come across as text and the formulas in the sheet are choking because they are expecting to sum numbers.

So I figured I'd just convert the data programmatically from text to numbers.

Changed the NumberFormat property and it doesn't help.
Tried messing with the PrefixCharacter property, but it's read only.

How can I get the values to convert from text to number? Excel offers the option as a SmartTag, but I can't find any method that will do it programmatically. Thanks.

Jerry