How do you determine TYPE of incoming data

M

Mike

I am reading in an Excel CSV file and I need to determine the data Type of
the fields being read in. There are numbers text, money, and dates. Is there
a function or technique that will give this info.

thanks for any help
 
N

Nguyen Pham Hong Phuoc

How can I install VB6 in Windows Vista??? I'm new to programming and it
takes me lots of time! Please help!
 
P

PlatinumBay

Mike,

The short answer is no because a csv file doesn't have a schema. There is
no way for the .NET framework to know whether the value "20517" is meant to
be a date representation, a string ("20517"), a number (20,517.00), currency
(though there is no 'currency' type), etc.

If you could describe a little more of your scenario, I'll see if I can help
find a solution. Usually when importing flat files, it is necessary to
understand what data it will contain, a schema so to speak.

Hope this helps,


Steve
 
M

Mike

thanks for the response Steve.

PlatinumBay said:
Mike,

The short answer is no because a csv file doesn't have a schema. There is
no way for the .NET framework to know whether the value "20517" is meant
to be a date representation, a string ("20517"), a number (20,517.00),
currency (though there is no 'currency' type), etc.

If you could describe a little more of your scenario, I'll see if I can
help find a solution. Usually when importing flat files, it is necessary
to understand what data it will contain, a schema so to speak.

Hope this helps,


Steve
 

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

Top