批量导入数据.net_.NET_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > .NET > 批量导入数据.net

批量导入数据.net

 2014/12/2 23:16:02  清宇诺诺  程序员俱乐部  我要评论(0)
  • 摘要:源网址:http://exceldatareader.codeplex.com/参考如下:NUGET引用NotePleasetrythelatestsourcefromtherepobeforereportingissuesastherehavebeenrecentchanges.Also
  • 标签:.net net 数据 导入数据

源网址:http://exceldatareader.codeplex.com/

参考如下:

NUGET引用

JSUlK59W+59eU7J4P/ISIqiRlUvv7nl445rZ7+552PNJMsoqy0vmrLpxzqobmRfYvLR3MZum9i4uX7m4vGzD/k2L16zkiOeU1hCIqY9s81L9rt9uXDP7w/ontYcf1j+5cc3s+l2/ddnFy6W9izlZqWxDm5aCNm0oL9vQ9umG8pLF+429kJcQ+QstOTDhkivMyKGOZ+rkRyTVj0t6ejH/od8j1T9RdvkTe9H2gJjqYHTyI5Ka6/2SppMfkVR3l9bsbXHJS2q/1fawf6XzPRUCITqyOsVVWyOef51Mb/0Y6+iS1Vinhf1+qR9t4ohpi/pdv/UpEhlZteCZVTvm3skpnFyqf6Js8f7+p9c4tOPR9T1rR7iECHL4d4lptfNsxFMdXdq7WG/pNlXR8tLexeWb6q0mPriECFVkVbXLqU189Y1zVlMu7V95+ROftuguaT8iOf2+VLahjXtPRd5WIRDBiDz9SqsF3yUEApFtwCUEQkzAJQRCTMAlBEJMwCUEQkzAJQRCTBAuAQAmAVwCQAxwCQAxlFWWl8xdPW/u6nnT/U0ACDdwCQAxlFWWl8y9Y97cO+ASAJNial06taWipKSkpOZt7qtv1zCdYyu2nDJfMv+tvwcf/Z1dtyE2sj5Af8LhmwHgjbtL7Nk92VPN3SXbhzu5ZD1Pnf7WA5sm5LtyXNKehEtgMhSsS77ykv5A9wsugcngxyXqBNP10p7THuinNiGevof1jL6Jh0usApOp41F5idTSfKampqJiy9tbampqOG/olNYAcCKrvKS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FSuqqqpuu+22K2aVwSUAPNBc0qZBNucof/a552659dbVq1evWLHitttvv+KqK0tm3nrVzFvhEgCOmLNVXrhwYWhoqKenp7Oz89NPP33gwQcXLVq0bNnylStXVsy5Fi4B4IHp0tjYmLbaRSKROHXq1JEjR5599tmamnWVlbdc9v3vwSUAPNBc0qYm1yZS7u/v7+7u/uqrrz777LOmpib5Xfm7110GlwDwgJyUfHx8/MKFC5pOyWTy66+/Pn36dHNL8+Xzvg+XAPCGTE1jY2OaToODg+fOnevt7W3/qv37N10BlwDwxkxNmk7j4+Ojo6PaYoHDw8Pf/P2bf55/ZcmVt8668tZZcAkAdxidNKPGxsZGR0eTqeQVC2fCJQB8oRhoC8yYRl28eLG3r/eKm+ESAJOmf6C/rLIcLgEwWeASAGKASwCIAS4BIAbDpVtmXXkLXAIgd+ASAGKASwCIAS4BIAa4BIAYWJcQCETOYbk03WIDEG7gEgBigEsAiAEuASCGssrykrJbystuKZ/ubwJAuIFLAIihrLK8pKyyvKwSLgEwKeASAGKASwCIoayy/P8D1EGMyLyBbZIAAAAASUVORK5CYII=" alt="" />

Note

Please try the latest source from the repo before reporting issues as there have been recent changes.
Also, if you are reporting an issue it is really useful if you can supply an example excel file as this makes debugging much easier and without it we may not be able to resolve any problems.

How to use

C# code :

FileStream stream = File.Open(filePath, FileMode.Open, FileAccess.Read);

//1. Reading from a binary Excel file ('97-2003 format; *.xls)
IExcelDataReader excelReader = ExcelReaderFactory.CreateBinaryReader(stream);
//...
//2. Reading from a OpenXml Excel file (2007 format; *.xlsx)
IExcelDataReader excelReader = ExcelReaderFactory.CreateOpenXmlReader(stream);
//...
//3. DataSet - The result of each spreadsheet will be created in the result.Tables
DataSet result = excelReader.AsDataSet();
//...
//4. DataSet - Create column names from first row
excelReader.IsFirstRowAsColumnNames = true;
DataSet result = excelReader.AsDataSet();

//5. Data Reader methods
while (excelReader.Read())
{
	//excelReader.GetInt32(0);
}

//6. Free resources (IExcelDataReader is IDisposable)
excelReader.Close();

VB.NET Code:

Dim stream As FileStream = File.Open(filePath, FileMode.Open, FileAccess.Read)

'1. Reading from a binary Excel file ('97-2003 format; *.xls)
Dim excelReader As IExcelDataReader = ExcelReaderFactory.CreateBinaryReader(stream)
'...
'2. Reading from a OpenXml Excel file (2007 format; *.xlsx)
Dim excelReader As IExcelDataReader = ExcelReaderFactory.CreateOpenXmlReader(stream)
'...
'3. DataSet - The result of each spreadsheet will be created in the result.Tables
Dim result As DataSet = excelReader.AsDataSet()
'...
'4. DataSet - Create column names from first row
excelReader.IsFirstRowAsColumnNames = True
Dim result As DataSet = excelReader.AsDataSet()

'5. Data Reader methods
While excelReader.Read()
    'excelReader.GetInt32(0);
End While

'6. Free resources (IExcelDataReader is IDisposable)
excelReader.Close()

 

上一篇: C#基础----Linq之List<T>篇 下一篇: 没有下一篇了!
发表评论
用户名: 匿名