cuike519(Help you,Help me) :通过PlaceHolder控件,从后台代码绑定xml数据集,存放到客户端.不知怎样绑定到owc spreadsheet. 下面的代码是绑定到owc chart控件的: 'Extract the contents of the XML Data island and insert it into two arrays: one array for the chart categories and one array for the Dim nCount, nodes, i Set nodes = dsXML.XMLDocument.childNodes.item(0).childNodes nCount = nodes.length Redim aNames(nCount) Redim aTotals(nCount) For i=1 to nCount aNames(i) = nodes.item(i-1).ChildNodes.item(0).text aTotals(i) = nodes.item(i-1).ChildNodes.item(1).text Next'Create a chart from the array data. 'Bind the chart to the recordset. Dim c Set c = CSpace.Constants Dim oChart, oSer CSpace.Clear Set oChart = CSpace.Charts.Add Set oSer = oChart.SeriesCollection.Add oSer.SetData c.chDimCategories, c.chDataLiteral, aNames oSer.SetData c.chDimValues, c.chDataLiteral, aTotals我查看了一chm帮助,大多数都是关于winform下使用owc spreadsheet控件的,没有webform下使用的例子.
下面的代码是绑定到owc chart控件的:
'Extract the contents of the XML Data island and insert it into two arrays: one array for the chart categories and one array for the
Dim nCount, nodes, i
Set nodes = dsXML.XMLDocument.childNodes.item(0).childNodes
nCount = nodes.length
Redim aNames(nCount)
Redim aTotals(nCount)
For i=1 to nCount
aNames(i) = nodes.item(i-1).ChildNodes.item(0).text
aTotals(i) = nodes.item(i-1).ChildNodes.item(1).text
Next'Create a chart from the array data.
'Bind the chart to the recordset.
Dim c
Set c = CSpace.Constants
Dim oChart, oSer
CSpace.Clear
Set oChart = CSpace.Charts.Add
Set oSer = oChart.SeriesCollection.Add
oSer.SetData c.chDimCategories, c.chDataLiteral, aNames
oSer.SetData c.chDimValues, c.chDataLiteral, aTotals我查看了一chm帮助,大多数都是关于winform下使用owc spreadsheet控件的,没有webform下使用的例子.