Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
vinay.a
Starting Member
20 Posts |
Posted - 2008-04-09 : 01:59:50
|
Hi,My name is vinay, I'm trying to upload an xls file to the sql server database table.I need to know about the 'OPENROWSET' and what: HDR=YES and Excel 8.0 implies.I read the following post"DO WE HAVE TO GIVE COL NAMES OF SHEET?", but was not able to understand. |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
vinay.a
Starting Member
20 Posts |
Posted - 2008-04-09 : 03:13:48
|
Thanks Peso. I appreciate your quick reply. That was helpful.Can you please explain me how OPENROWSET works.I need to know this because, I am trying to upload an xls file into sql server database.It's now getting uploaded.One of the columns (id) in the xls file is sometimes empty.I need to identify such columns and generate an id programmatically, before inserting it into the database table, for which I need to read row by row from the xls file. Can you help me with this.regards,vinay |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-04-09 : 03:26:59
|
quote: Originally posted by vinay.a Thanks Peso. I appreciate your quick reply. That was helpful.Can you please explain me how OPENROWSET works.I need to know this because, I am trying to upload an xls file into sql server database.It's now getting uploaded.One of the columns (id) in the xls file is sometimes empty.I need to identify such columns and generate an id programmatically, before inserting it into the database table, for which I need to read row by row from the xls file. Can you help me with this.regards,vinay
Why dont you export data to table and then update a table with numbers?or you can have identity column in the table and insert into the table by omitting the number column from EXCELMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|