将xlsx导入Datatable的最快方法-> 7个文件,具有200 MB的数据 [英] Fastest Way to import xlsx to Datatable--> 7 files with 200 MB of Data

查看:63
本文介绍了将xlsx导入Datatable的最快方法-> 7个文件,具有200 MB的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当前我正在使用OLEDB&它可以正常工作,但要花很多时间,因为我有7个文件和200 MB的数据

Currently I am Using OLEDB & its Working but its taking lot of Time as I have 7 files with 200 MB of Data

MyConnection = New System.Data.OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source='C:\port.xlsx';Extended Properties=""Excel 12.0 Xml;HDR=YES""")
            MyConnection.Open()
            MyCommand = New System.Data.OleDb.OleDbDataAdapter("Select * from [BCR$]", MyConnection)
               DtSet = New System.Data.DataSet
            MyCommand.Fill(DtSet)
            HBReport = DtSet.Tables(0)
              MyConnection.close

我不想使用OLEDB....我想要将xlsx导入Datatable的最快方法.

I dont want to Use OLEDB....I Want the Fastest Way to import xlsx to Datatable.

推荐答案

最快的方法,但需要大量代码的是Office XML.

The quickest method but requires a great deal of code is Office XML.

https://msdn.microsoft.com/zh-我们/library/office/gg575571.aspx?f=255&MSPPError=-2147217396


这篇关于将xlsx导入Datatable的最快方法-> 7个文件,具有200 MB的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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