Hi,I have this problem with importing an XLS file into the database. I tried many variants but nothing worked. For example when I try to select the contents of the XLS like this:SELECT CONVERT(xml, BulkColumn, 2) FROM OPENROWSET(Bulk 'C:\Files\Person.xls', SINGLE_BLOB) AS x;
I get the following error:Msg 9403, Level 16, State 1, Line 1XML parsing: line 0, character 0, unrecognized input signature
I tried also the following:INSERT INTO Person WITH (KEEPIDENTITY) (id, name, sname, yob) SELECT * FROM OPENROWSET(BULK 'C:\Files\Person.xls', SINGLE_BLOB) AS x;
I get this error:Msg 120, Level 15, State 1, Line 1The select list for the INSERT statement contains fewer items than the insert list. The number of SELECT values must match the number of INSERT columns.
I try only with the SELECT without the INSERT like this:SELECT *FROM OPENROWSET(BULK 'C:\Files\Person.xls', SINGLE_BLOB) AS x;
and then I get a table with a single column named BulkColumn and with a single row (cell) which contains some hexadecimal number.Any idea what's wrong?