473,326 Members | 2,104 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,326 software developers and data experts.

All data is text in ADO Update to Excel...

I am updating several excel worksheets using ADO.NET (OLEDB objects). Everything is working fine except all the data is inserted as text despite being typed in the DataTable object and when the Excel worksheet was actually created.

If the user-specified Excel Workbook does not exist, one is created and worksheets are added using "CREATE TABLE" statements with type-specific data columns. The data type for each column is specified in the DataTable object as well as the actual "CREATE TABLE" SQL statement.

However, if the user-specified workbook already exists, the worksheets will be updated correctly, but all data will be inserted as text values regardless of how it is typed in the DataTable.

Any help, suggestions, or advice would be greatly appreciated.

- Carl
Nov 16 '05 #1
1 1409
All Jet will bother to do if you execute CREATE TABLE against an Excel data
source is to add a new sheet to the workbook.
You've got to remember although it can be used as one, Excel isn't really
intended as a database, and to manipulate it accurately you need to use
automation.

"Vagabond Software" <carlfenley-X-@-X-san.rr.com> wrote in message
news:ON**************@TK2MSFTNGP10.phx.gbl...
I am updating several excel worksheets using ADO.NET (OLEDB objects).
Everything is working fine except all the data is inserted as text despite
being typed in the DataTable object and when the Excel worksheet was
actually created.

If the user-specified Excel Workbook does not exist, one is created and
worksheets are added using "CREATE TABLE" statements with type-specific data
columns. The data type for each column is specified in the DataTable object
as well as the actual "CREATE TABLE" SQL statement.

However, if the user-specified workbook already exists, the worksheets will
be updated correctly, but all data will be inserted as text values
regardless of how it is typed in the DataTable.

Any help, suggestions, or advice would be greatly appreciated.

- Carl
Nov 16 '05 #2

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

Similar topics

4
by: RK | last post by:
Hi, In my application, I need to copy data from an Excel file into a SQL table. The article related to this can be found at http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B306572 ...
3
by: Chris | last post by:
Could someone please provide me an effective means of exporting data from a data set (or data grid) to Excel?
8
by: harry | last post by:
Hi Folks: I'm trying to do something that looks simple, but I can't make it work right. It's Access 2000 on a Win2000 computer. I create a database with 5 columbs. The data I need to import...
3
by: Mads Petersen | last post by:
I'm stuck in this code. Hope you can and will help me. I launch it from excel. I have made the following code work, but not as i whant. I need the ranges to be working with something like xlDown....
2
by: Andy Davis | last post by:
Has anybody tried and had any success exporting data directly from ACT! 2000 to an Access database? I need to transfer data from ACT! to Access, but the data is all imported as text, including date...
1
by: roger.rigsby | last post by:
Ok I know how to get the data I want from mysql but I need to actually do something with this data and then send it back to mySQL. Company heads love the spreadsheet view so this is serious...
7
by: semijoyful | last post by:
OS: Win XP SP2 Access version: 2003 Excel version: 2003 I am new at this, as I am sure you have gathered from this post title:) I am working on a form where users can input data in Access and...
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...
6
by: insirawali | last post by:
Hi all, I have this problem, i need to know is there a way i cn use the data adapter's update method in this scenario. i have 3 tables as below create table table1{ id1 int identity(1,1)...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
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: 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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.