本文介绍了将超过3个excel表读入OleDbSchemaGuid.Tables的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





是否可以使用以下代码将超过3张excel表读入OleDbSchemaGuid.Tables



  string  ExcelPath =一些excel文件路径
string ExcelFileName =一些excel文件名

connection = new OleDbConnection( provider = + Provider + ;数据源= ' + ExcelPath + ExcelFileName + '; + 扩展属性= \ + ExtendedProperties + \ ;);
connection.Open();

DataTable dtSheet = connection.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null );







任何人都可以对此提出一些建议???





谢谢

John

解决方案

Hi,

Is it possible to read more than 3 excel sheets using the following code into OleDbSchemaGuid.Tables

string ExcelPath = some excel file path
string ExcelFileName = some excel file name

connection = new OleDbConnection("provider =" + Provider + "; Data Source='" + ExcelPath + ExcelFileName + "';" + "Extended Properties=\"" + ExtendedProperties + "\";");
connection.Open();

DataTable dtSheet = connection.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);




Can any body suggest something about this???


Thanks
John

解决方案


这篇关于将超过3个excel表读入OleDbSchemaGuid.Tables的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-19 19:19