• mgkirsch,

    I used xquery orignally and changed to use OPENXML and PIVOT due to the following two issues:

    1) It was slow for big xml;

    2) If any cell in the spreadsheet does not have value, you will not get valid data imported.

    I still keep the xquery code there as commented out. If you need to use xquery, you need to resorgnaize the stored procedure a little bit, and make sure all cells in the spreadsheet have values.