473,385 Members | 1,925 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,385 software developers and data experts.

when getting excel data with ole...

Hello~ ^^
I have a question about getting excel data with oledbconnection.

I entered '23190000' to Excel Cell and changed Column width to small, then
the value chaged to 2E+07 or ####.
And I saved this file...(maybe both data saved..viewed data and original data)
when openning this file with oledbconnection, I got '2E+07' without original
data '23190000'.
I'd want to get original data '23190000' instead of viewed data like
'2E+07', '#####', '23,190,000'.

I used connection string like this..
OleDbConnection db = new OleDbConnection
("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + m_sarFileName[iIndex]
+";Extended Properties=Excel 8.0;" );

Thank you...
Nov 16 '05 #1
1 1701
Try looking into the NumberFormat property of the Cells.
"Antonio. kim" wrote:
Hello~ ^^
I have a question about getting excel data with oledbconnection.

I entered '23190000' to Excel Cell and changed Column width to small, then
the value chaged to 2E+07 or ####.
And I saved this file...(maybe both data saved..viewed data and original data)
when openning this file with oledbconnection, I got '2E+07' without original
data '23190000'.
I'd want to get original data '23190000' instead of viewed data like
'2E+07', '#####', '23,190,000'.

I used connection string like this..
OleDbConnection db = new OleDbConnection
("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + m_sarFileName[iIndex]
+";Extended Properties=Excel 8.0;" );

Thank you...

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Ksenia Marasanova | last post by:
Hi, I have a little problem with encoding. Was hoping maybe anyone can help me to solve it. There is some amount of data in a database (PG) that must be inserted into Excel sheet and emailed....
5
by: DAVID SCHULMAN | last post by:
I've been trying to perform a calculation that has been running into an underflow (insufficient precision) problem in Microsoft Excel, which calculates using at most 15 significant digits. For this...
2
by: Michael Sanford | last post by:
I'm getting a Sysmte.IO.FileNotFoundException when executing the code below. It is straight from the example. This works on one machine, but not the other. Other benign calls invoke the same...
3
by: | last post by:
I wrote a class in VB.NET to export the contents of a datagrid to Excel. It works perfectly on my machine, but it fails on my customers' PCs that have identical versions of Win XP (SP1) and Excel...
6
by: syvman | last post by:
Hi everyone... I am pulling my hair out trying to do this, and was wondering if someone could give me some assistance... I have an Excel spreadsheet containing several worksheets. I'd like to be...
0
by: Judy | last post by:
I'm searching for some data. After getting the data from sql, i'm using stringbuilder and then i'm passing this as a binary stream. I am trying to display an Excel file of this data in a browser,...
2
by: radink | last post by:
I have an established secured access database. I would like to read fields in the Access DB while im in excel via the external database query tools. However im getting an error about not having...
2
by: chike_oji | last post by:
Please can someone help me. I am writing a web application, that allows for the upload of an excel sheet into the database. I have an upload button and a save button. The upload button allows...
8
ammoos
by: ammoos | last post by:
Hi Friends I am getting the following error when I am trying to read data from an excel sheet using sql script OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error. The provider did not...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.