C#通过OleDb读取Excel文件 [英] C# read open Excel file through OleDb

查看:186
本文介绍了C#通过OleDb读取Excel文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用.NET 3.5连接到打开 Excel 2003文件

I need to connect to an open Excel 2003 file using .NET 3.5

似乎我正在尝试使用的OleDb连接只需要文件。但是我需要在Excel中同时打开这个文件。

It seems the OleDb connection which I am trying to use wants the file exclusively. But I need to have this file open in Excel in the same time.

非锁定阅读是否可能?

编辑:我在打开文件之前解决了这个问题。

I resolved this by copying file before opening it.

推荐答案

这个问题似乎没有答案。我不能删除它....

the question seems have no answer. and I cant delete it....

我的解决方案是 - 在定时器上运行宏来保存有问题的excel文件,C#应用程序将文件复制到另一个文件使用OleDb读取它。

my solution was - run macro on timer to save the excel file in question and C# app was copying the file to another one and reading it using OleDb.

这篇关于C#通过OleDb读取Excel文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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