首页 > 其他 > 详细

Read data from Excel XML file

时间:2015-01-23 15:54:04      阅读:269      评论: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)
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!