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

Delete a row from Excel via ADO.NET

Hi,

I have a ADO.NET - Connection to an Excel file. UPDATE and INSERT works
fine. Now I want to DELETE lines, but it doesn't works (I get an error
message). Microsoft says, that there is no way to to this.
Knows anybody a way?

best regards
Jan
Dec 7 '06 #1
2 3179
Jan,

Where does Microsoft say this? The reason is most likely that there is
no primary key information that you can use to accurately identify rows in
the sheet (you could try and do a field by field match, but that's highly
unlikely).

What you might want to do is use automation to do this, and delete the
row manually.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jan Lorenz" <Kn*******@gmx.dewrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Hi,

I have a ADO.NET - Connection to an Excel file. UPDATE and INSERT works
fine. Now I want to DELETE lines, but it doesn't works (I get an error
message). Microsoft says, that there is no way to to this.
Knows anybody a way?

best regards
Jan

Dec 7 '06 #2
Hi,

I have a primary key. But I got the following error message: "Deleting data
in a linked table is not supported by this ISAM."
I have found it under
http://support.microsoft.com/?scid=k...57819&x=7&y=11

The reason because I want to to this is, that I want to synchronize some
data of our customer database with this excel file.

Jan

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comschrieb
im Newsbeitrag news:e8**************@TK2MSFTNGP03.phx.gbl...
Jan,

Where does Microsoft say this? The reason is most likely that there is
no primary key information that you can use to accurately identify rows in
the sheet (you could try and do a field by field match, but that's highly
unlikely).

What you might want to do is use automation to do this, and delete the
row manually.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jan Lorenz" <Kn*******@gmx.dewrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>Hi,

I have a ADO.NET - Connection to an Excel file. UPDATE and INSERT works
fine. Now I want to DELETE lines, but it doesn't works (I get an error
message). Microsoft says, that there is no way to to this.
Knows anybody a way?

best regards
Jan


Dec 8 '06 #3

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

Similar topics

1
by: smonczka | last post by:
I have a DTS package that needs to refresh data in 3 separate Excel spreadsheets on a daily basis. The problem is that unless I manually delete the previous day's data, it appends rather than...
1
by: GG | last post by:
Have this code but does not delete right columns. When I ran the folllowing code only columns 14, and 15 is deleted.Col 12 and 13 are still there. Any ideas? Thanks for (int colDel = 12;...
7
by: Smitty | last post by:
I have a function that imports an Excel file into an Access table using SQL. I then close the OleDataReader and the OleDbConnection, then dispose the OleDbCommand, then OleDbConnection. The calling...
8
by: DavidB | last post by:
I'm trying to delete a file with File.Delete("c:\Documents and Settings\%username%\Application Data\Microsoft\Excel\excel*.xlb") On doing this I get an Exception "Illegal characters in path" -...
2
by: Bas | last post by:
I',m trying to delete a named worksheet - what's wrong with this?? xlApp = New Excel.Application() Dim xWorkbook As Excel.Workbook Dim PageSht As Excel.Worksheet xWorkbook =...
6
by: Karl Richards | last post by:
I am attempting to delete duplicate rows in a spreadsheet using the Excel object. Does anyone have any idea how to do this? I've looked everywhere that I can find on the Web and have not been...
4
by: B.N.Prabhu | last post by:
How to delete first row from an Excel Sheet using C#.Net. Please Help. Its very urgent.
3
by: Rene | last post by:
Hi Proggies, i try to delete an excel worksheet but nothing happens (work on vb.net 2005) ..... xlSheet = xlApp.Sheets("Master") xlSheet.select xlSheet.delete also try
2
by: Bxitty | last post by:
Hello all, I am trying the below code to delete a worksheet using VB.NET..I amgeeting an error with the delete...any idea where this could be wrong.. Dim str_path As String Dim...
3
by: Will | last post by:
Can someone help with code to delete multiple columns from an excel spreadsheet? I know which columns I need to delete. The code below will delete a single column but I'm not sure how to delete...
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:
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
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...
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...

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.