码迷,mamicode.com
首页 > 其他好文 > 详细

Read data from Excel XML file

时间:2015-01-23 15:56:49      阅读:122      评论:0      收藏:0      [点我收藏+]

标签:

Copied from http://stackoverflow.com/questions/6472533/xquery-and-node-ids

 

;WITH XMLNAMESPACES(
    DEFAULT ‘urn:schemas-microsoft-com:office:spreadsheet‘
    ,‘urn:schemas-microsoft-com:office:office‘ as o
    ,‘urn:schemas-microsoft-com:office:excel‘ as x 
    ,‘urn:schemas-microsoft-com:office:spreadsheet‘ as ss
    ,‘http://www.w3.org/TR/REC-html40‘ as html
)

SELECT 
        t.r.value(‘../Row[1]/*[1]‘, ‘varchar(50)‘) 
        ,t.r.value(‘(*)[1]‘, ‘varchar(50)‘)
FROM dbo.SSRSReports s
OUTER APPLY s.rdl.nodes(‘/Workbook/Worksheet[1]/Table/Row[position() > 1]‘) t(r)
WHERE ID=3

 

Read data from Excel XML file

标签:

原文地址:http://www.cnblogs.com/hopecho/p/4244335.html

踩
(0)
赞
(0)
   
举报
评论 一句话评论(0)
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!