Data conversion problem

  • Thread starter Thread starter Biti
  • Start date Start date
B

Biti

I am new to excel macro. I am importing data from SQL server into
excel. My script within DTS job creates the file using a template and
populate the sheets. The query runs fine and the data gets populated.
But the problem is that all the numeric fields are in wrong data
type. It looks like they are all character and there is a small green
arrow at the top of each field. What do I need to do to convert them
to number as soon as the sheet finished populating? I tried
formatting my template, but did not work. The number of record change
with every run.

Any suggestion??
Biti
 
What do I need to do to convert them to number as soon as the sheet
It's difficult to answer this without knowing why the numerical data has
come in as text. It may be that spaces or other invisible characters were
included with the data. But there could be other reasons too. Hard to say
without seeing the file. Maybe you could send me a small example.

--
Jim Rech
Excel MVP
|I am new to excel macro. I am importing data from SQL server into
| excel. My script within DTS job creates the file using a template and
| populate the sheets. The query runs fine and the data gets populated.
| But the problem is that all the numeric fields are in wrong data
| type. It looks like they are all character and there is a small green
| arrow at the top of each field. What do I need to do to convert them
| to number as soon as the sheet finished populating? I tried
| formatting my template, but did not work. The number of record change
| with every run.
|
| Any suggestion??
| Biti
 
Back
Top