473,325 Members | 2,608 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

parsing excel integer column but get double datatype in c# using oledb

Hi,
I am doing parsing an excel file but when i parsed the integer column it shows System.Double as Column Data type.
Please help me to get out of this.

I tried in excel to make customized column Data type, but still i get the double value.
Jan 20 '16 #1
1 1850
Luuk
1,047 Expert 1GB
Expand|Select|Wrap|Line Numbers
  1. checked
  2. {
  3.     try
  4.     {
  5.         int bar = (int)foo;
  6.     }
  7.     catch (OverflowException)
  8.     {
  9.      ...          
  10.     }
  11. }
see: http://stackoverflow.com/questions/3...-double-to-int
Feb 6 '16 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: GIMME | last post by:
I can't figure an expression needed to parse a string. This problem arrises from parsing Excel csv files ... The expression must parse a string based upon comma delimiters, but if a comma...
1
by: svijay | last post by:
hi I have got a strange problem. May I know any solution for this. Here is the detailed description about the problem We have got a mainframe system and also production and development...
0
by: genojoe | last post by:
I have a 4 column, 6 row Excel sheet with all cells formatted for text: 1 1 a a 2 2 b b 3 3 c c a 4 d 1 b 5 e 2 c 6 f 3 I have the following schema.ini:
4
by: Abel | last post by:
Hi I try to execute an sample how to read and write excel sheets using OleDb When opens the connection, the objConn.Open gave me this error: "Request for the permission of type...
0
by: mohaaron | last post by:
I am finding that when a GridView is export to Excel by changing the ContentType of the page the Excel file is not readable by OleDb or SQL Server DTS. I also tried using a Excel Reader that I...
0
by: satenova | last post by:
Hello Friends, I am newbie when it comes to vb.net and i need to import excel sheet into access db using vb.net application. Here is the code i use for now to upload excel sheet and it works...
1
by: =?Utf-8?B?U2hlZXMgQWJpZGk=?= | last post by:
I read an article on the link: http://support.microsoft.com/default.aspx?scid=kb;en-us;306572 related to reading data from Excel using OLEDB The topic's heading is: How to query and display excel...
0
rhitam30111985
by: rhitam30111985 | last post by:
Hi all, I am using oledb to read values from an excel file as follows : Dataset DS = new Dataset(); OleDbCommand objCmdSelect = new OleDbCommand("SELECT * FROM where UrlID=" +...
2
by: vasanth chandrasekaran | last post by:
Hai All, I try to insert the Dataset value in Exiting excel file by using OLEDB provider.But i face error messagge in objCmd.ExecuteNonQuery(); The error is :Syntax error in INSERT...
0
by: apssiva | last post by:
I need to import some particular column data from csv or excel files in my student table so that for each student ID it will update an existing field. My tools for accessing the database on the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.