ThinkDonk/ExcelToSqlServer
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
summery: This code can help you read excel insert into database,but you need know something 1 you can use OpenXml or NOPI to read excel 2.if you use OpenXml to read excel,so it only can read xlsx,if you need read xls,you can use NOPI 3.if you use OpenXml to read excel,so you need have Open XML SDK 2.0 for Microsoft Office,source link http://www.microsoft.com/en-us/download/details.aspx?id=5124 4.if you use NOPI to read excel,you will need directory of name is 'Dll' 5.you need Special table, it need have column ID and other of you need 6.about column ID: it is flag of table,prevent duplicates 综述: 这段代码可以帮助您读取excel插入到数据库,但你需要知道 1. 你可以使用OpenXml或NOPI读取excel 2. 如果你使用OpenXml读取excel,它只能读xlsx,如果您需要读取xls,您可以使用NOPI 3. 如果你使用OpenXml读取excel,所以你仍然需要有 Open XML SDK 2.0 for Microsoft Office ,链接 http://www.microsoft.com/en-us/download/details.aspx?id=5124 4. 如果你使用NOPI读取excel,你会需要Dll文件夹里的东西 5. 你需要特殊的表,它需要有 ID 和 其他你需要的列 6. 有关列 ID:它是表的标志,防止重复的