使用C#从Excel删除数据 [英] Deleting data from Excel using C#

查看:331
本文介绍了使用C#从Excel删除数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我正在尝试使用OLEDB提供程序从excel中删除数据,这会引发错误此ISAM不支持删除链接表中的数据
您能告诉我吗,我们有什么替代方法可以删除Excel工作表中的所有数据.

Ramakrishna.

解决方案

您使用的是哪个版本的Excel.尝试在系统上创建.UDL文件,然后双击该文件,这将显示对话框..选择提供商,然后选择文件所在的位置并进行testconnection ..最后,使用记事本打开同一对话框,这将显示连接字符串,您需要将其复制并粘贴到oledb连接字符串中


HI All,
I am trying to delete data from excel using OLEDB provider, this is throwing error Deleting data in a linked table is not supported by this ISAM
can you please let me know do we have any altenative way to delete all the data in an excel sheet.

Ramakrishna.

解决方案

What version of Excel your using .. try to create .UDL file on your system and double click on that file which will show the dialogue box .. choose your provider and select your file where its located and testconnection .. finally open this same dialogue box using notepad this will show the connection string which you will require copy and paste it your oledb connection string


这篇关于使用C#从Excel删除数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆