如何将excel表插入sql server并从中检索数据?

人气:584 发布:2022-09-22 标签: ASP.NET4

问题描述

嗨我必须将excel表插入sql server 2005,然后我想从excel表中单独检索数据,例如我在excel表中有1000行,并且想要将这100行插入到表中sql server 2005,如何将那些1000复制到数据库中,请任何人帮帮我?

hi i have to insert excel sheet into sql server 2005,and then i want to retrieve the data from excel sheet seperatly,for example i have 1000 rows in excel sheet,and want to insert these 100 rows into table which is in sql server 2005,how to copy those 1000 into databse,please can any one help me ?

推荐答案

如果你想在数据库中拥有实际的excel FILE那么你正在寻找插入二进制对象 http://technet.microsoft.com/en-us/library/bb895234.aspx [ ^ ] 如果您想要将所有数据从所述excel加载到表中文件(可能在将其导出到csv之后)然后你正在查看批量插入 bryce well if you want to have the actual excel FILE in the database then you're looking at inserting a binary object http://technet.microsoft.com/en-us/library/bb895234.aspx[^] and if you're wanting load all the data into a table from said excel file (probably after exporting it to csv) then you're looking at a bulk insert bryce

请参阅此链接, http://stackoverflow.com/questions/3474137/how-to-export-data-from-excel-spreadsheet-to-sql-server-2008-table [ ^ ] Refer this link, http://stackoverflow.com/questions/3474137/how-to-export-data-from-excel-spreadsheet-to-sql-server-2008-table[^]

是的我想将excel表数据存储到sql表中?但我不知道怎么样,能帮助我吗? yes i wanted to store the excel sheet data to sql table?but i don't know how,can you please help me?

287