473,385 Members | 1,492 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.

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 3113
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. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.