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

Open an Excel File with DataAdapter

We are opening an excel file using a dataadapter object.
The tables included in excel file are loaded into a dataset object.
This process works correctly except for this issue:

There is an "Comment" field included in the excel sheet with 255 characters,
but the dataset only read 64 characters.

Have any idea to solve this problem?
Nov 22 '05 #1
4 3115
On Tue, 5 Oct 2004 08:19:01 -0700, "JASV" <JA**@discussions.microsoft.com> wrote:

¤ We are opening an excel file using a dataadapter object.
¤ The tables included in excel file are loaded into a dataset object.
¤ This process works correctly except for this issue:
¤
¤ There is an "Comment" field included in the excel sheet with 255 characters,
¤ but the dataset only read 64 characters.
¤
¤ Have any idea to solve this problem?
¤

Don't think I've seen this issue before unless the number of characters exceeds 255. Couple of
things to try. Assuming you're using the Jet OLEDB provider and Excel ISAM I would add the IMEX
argument to your connection string:

"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=D:\My Documents\Book2.xls;Extended Properties=""Excel 8.0; IMEX=1;"""

You may want to try changing the TypeGuessRows entry in the Registry as well:

http://support.microsoft.com/default...;EN-US;Q281517
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 22 '05 #2
Paul,

We try with your tips but our problem remains.

when we ask for the "comment" field stored in dataset, it contains only 64
characters.

If you prefer, we can send you the source code.

Thanks for you answer

JASV

"Paul Clement" wrote:
On Tue, 5 Oct 2004 08:19:01 -0700, "JASV" <JA**@discussions.microsoft.com> wrote:

¤ We are opening an excel file using a dataadapter object.
¤ The tables included in excel file are loaded into a dataset object.
¤ This process works correctly except for this issue:
¤
¤ There is an "Comment" field included in the excel sheet with 255 characters,
¤ but the dataset only read 64 characters.
¤
¤ Have any idea to solve this problem?
¤

Don't think I've seen this issue before unless the number of characters exceeds 255. Couple of
things to try. Assuming you're using the Jet OLEDB provider and Excel ISAM I would add the IMEX
argument to your connection string:

"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=D:\My Documents\Book2.xls;Extended Properties=""Excel 8.0; IMEX=1;"""

You may want to try changing the TypeGuessRows entry in the Registry as well:

http://support.microsoft.com/default...;EN-US;Q281517
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)

Nov 22 '05 #3
Paul,

We try with your tips but our problem remains.

when we ask for the "comment" field stored in dataset, it contains only 64
characters.

If you prefer, we can send you the source code.

Thanks for you answer

JASV

"Paul Clement" wrote:
On Tue, 5 Oct 2004 08:19:01 -0700, "JASV" <JA**@discussions.microsoft.com> wrote:

¤ We are opening an excel file using a dataadapter object.
¤ The tables included in excel file are loaded into a dataset object.
¤ This process works correctly except for this issue:
¤
¤ There is an "Comment" field included in the excel sheet with 255 characters,
¤ but the dataset only read 64 characters.
¤
¤ Have any idea to solve this problem?
¤

Don't think I've seen this issue before unless the number of characters exceeds 255. Couple of
things to try. Assuming you're using the Jet OLEDB provider and Excel ISAM I would add the IMEX
argument to your connection string:

"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=D:\My Documents\Book2.xls;Extended Properties=""Excel 8.0; IMEX=1;"""

You may want to try changing the TypeGuessRows entry in the Registry as well:

http://support.microsoft.com/default...;EN-US;Q281517
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)

Nov 22 '05 #4
On Wed, 6 Oct 2004 15:23:02 -0700, "JASV" <JA**@discussions.microsoft.com> wrote:

¤ Paul,
¤
¤ We try with your tips but our problem remains.
¤
¤ when we ask for the "comment" field stored in dataset, it contains only 64
¤ characters.
¤
¤ If you prefer, we can send you the source code.
¤
¤ Thanks for you answer
¤
¤ JASV

If you want to send me a sample Excel workbook (in a zip file) I can take a look at it.
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 22 '05 #5

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

Similar topics

6
by: Micke | last post by:
Hi, I'm trying to open an Excel file from an aspx with following code: Imports Excel = Microsoft.Office.Interop.Excel Dim oExcel As New Excel.Application Dim oBooks As Excel.Workbooks...
1
by: Raggie | last post by:
Gentlemen, first of all I have a general question... is it possible to open an excel file directly through the ASP.NET page without to install Excel on server? I tried something on my...
2
by: Peter S. | last post by:
I have an ASP.NET page that invokes a web control written in C#. What I want to do is (based on the session ID) display a certain spreadsheet that exists on a network drive. I want the webcontrol...
0
by: shaurya.rastogi | last post by:
I need to open an Excel file that has been stored in the Access Database using the insert Object functionality of MSAccess manually. What i am aware of is that i cant just read the field...
0
by: shaurya | last post by:
I need to open an Excel file that has been stored in the Access Database using the insert Object functionality of MSAccess manually. What i am aware of is that i cant just read the field...
1
by: anuragNet | last post by:
Hi, I have an excel file,having lot or micros, connecting to database, doing some complex calculation..inshot that excel file is itself an application. Now I want to open that excel in VB.net form,...
0
by: kennedystephen | last post by:
For the life of me, I cannot get this ... I have 1 excel document. I want to open that document and copy the first 50 rows to a new document. Then get the next 50 rows and copy those to a brand...
9
by: Looch | last post by:
Was hoping I could get some insight on this. I added a text box and command button to a web page and added the code in the .vb file to open an existing Excel file based on what was typed in the...
1
by: barry.zhao | last post by:
Hi, I have a python program that constantly updates an excel spreadsheet. I would like to be able to view its updates while using excel to edit other excel files. Below are the test codes I...
1
Soniad
by: Soniad | last post by:
Hi, I want to open an excel file from ASP Page, direclty. Means, Now I can open excel file on onclick by giving its path. But,it's prompting a dialog box with "Open/Save/Cancel" Option. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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:
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.