Quantcast
Channel: Validate Excel Data, If failed show error
Viewing all articles
Browse latest Browse all 2

Re: Validate Excel Data, If failed show error

$
0
0

Hi yvdk7788,

yvdk7788

I need to Import Excel Sheet data and i need to make validate all headers, If any errors I would like to show error message with particular Number and Header to User

As for this issue, I suppose you could use the Object.GetType Method to get the Type of the current instance. You loop through the DataTable and refer to the following code to check the Type:

/* dt is the object of datatable . */

System.Type type = dt.Rows[0][1].GetType();
if (type == typeof(string))
 {
     dt.Rows[0][1] = "Data type is string";
}

Best Regards,
Dillion


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>