网页中用office图表组件来画图的问题!80分24小时内给分,多谢各位。UP有分!

davidwx 2003-06-03 03:13:32
M$有一个组件,叫Microsoft Office Web 组件 他可以用来在网页上实现功能较强的图表。各位有例程或相关资料吗。
可以发给我davidhk@sohu.com 或者告诉我相关网址。

一定给分,谢谢各位!
...全文
130 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
online 2003-06-03
  • 打赏
  • 举报
回复
看看这里WWW.OURFLY.COM
davidwx 2003-06-03
  • 打赏
  • 举报
回复
谢谢jobine(灼冰)(输了你,赢了世界又如何)

你是用
<object id="ChartSpace1" classid="CLSID:0002E556-0000-0000-C000-000000000046" style="width:49%;height:350" VIEWASTEXT>
</object>
来创建对象的,可以用Createobject来创建吗?

各位还有ChartSpace的相关程序吗?多谢
cpio 2003-06-03
  • 打赏
  • 举报
回复
如果安客户端没有安装OFFICE办?
davidwx 2003-06-03
  • 打赏
  • 举报
回复
自己UP
andy2001p 2003-06-03
  • 打赏
  • 举报
回复
楼上好东东! 谢谢了
jobine 2003-06-03
  • 打赏
  • 举报
回复
<object id="ChartSpace1" classid="CLSID:0002E556-0000-0000-C000-000000000046" style="width:49%;height:350" VIEWASTEXT>
</object>
<object id="Spreadsheet1" classid="CLSID:0002E551-0000-0000-C000-000000000046" style="width:49%;height:350" VIEWASTEXT>
</object>
<b>Source: </b>Industry Data
<p>
<script language="vbscript">
Sub Window_OnLoad()

Dim chConstants

Spreadsheet1.ActiveSheet.Cells.Clear
Spreadsheet1.ActiveSheet.Cells(2, 1).Value = "Car"
Spreadsheet1.ActiveSheet.Cells(3, 1).Value = "Sport-Utility"
Spreadsheet1.ActiveSheet.Cells(4, 1).Value = "Truck"
Spreadsheet1.ActiveSheet.Cells(5, 1).Value = "Minivan"

Spreadsheet1.ActiveSheet.Cells(1, 2).Value = "1998"
Spreadsheet1.ActiveSheet.Cells(2, 2).Value = 0.2
Spreadsheet1.ActiveSheet.Cells(3, 2).Value = 0.06
Spreadsheet1.ActiveSheet.Cells(4, 2).Value = 0.17
Spreadsheet1.ActiveSheet.Cells(5, 2).Value = 0.13

Spreadsheet1.ActiveSheet.Cells(1, 3).Value = "1999"
Spreadsheet1.ActiveSheet.Cells(2, 3).Value = 0.38
Spreadsheet1.ActiveSheet.Cells(3, 3).Value = 0.82
Spreadsheet1.ActiveSheet.Cells(4, 3).Value = 0.28
Spreadsheet1.ActiveSheet.Cells(5, 3).Value = 0.62

Spreadsheet1.ActiveSheet.Cells(1, 4).Value = "2000"
Spreadsheet1.ActiveSheet.Cells(2, 4).Value = 0.42
Spreadsheet1.ActiveSheet.Cells(3, 4).Value = 0.12
Spreadsheet1.ActiveSheet.Cells(4, 4).Value = 0.55
Spreadsheet1.ActiveSheet.Cells(5, 4).Value = 0.25

' Clear the contents of the chart workspace. This removes
' any old charts that may already exist and leaves the chart workspace
' completely empty. One chart object is then added.
ChartSpace1.Clear
ChartSpace1.Charts.Add
Set chConstants = ChartSpace1.Constants

' Set the chart DataSource property to the spreadsheet.
' It is possible to specify multiple data sources, but this example uses only one.
ChartSpace1.DataSource = Spreadsheet1

' Add three series to the chart.
ChartSpace1.Charts(0).SeriesCollection.Add
ChartSpace1.Charts(0).SeriesCollection.Add
ChartSpace1.Charts(0).SeriesCollection.Add

'ChartSpace1.Charts(0).SeriesCollection.Add

' Connect the chart to data by specifying spreadsheet cell references
' for the different data dimensions.
' Notice that the series name is also bound to a spreadsheet cell. Changing
' the contents of the cell "B1" will also change the name that appears in the legend.
' If you don't want this behavior, set SeriesCollection(0).Caption instead of
' using the SetData method to bind the series name to the spreadsheet.

' Series one contains sales growth data for 1998.
' Bind the series name, the category names, and the values.
ChartSpace1.Charts(0).SeriesCollection(0).SetData chConstants.chDimSeriesNames, chConstants.chDataBound, "B1"
ChartSpace1.Charts(0).SeriesCollection(0).SetData chConstants.chDimCategories, chConstants.chDataBound, "A2:A5"
ChartSpace1.Charts(0).SeriesCollection(0).SetData chConstants.chDimValues, chConstants.chDataBound, "B2:B5"

' Series two contains sales growth data for 1999.
ChartSpace1.Charts(0).SeriesCollection(1).SetData chConstants.chDimSeriesNames,chConstants.chDataBound, "C1"
ChartSpace1.Charts(0).SeriesCollection(1).SetData chConstants.chDimCategories,chConstants.chDataBound, "A2:A5"
ChartSpace1.Charts(0).SeriesCollection(1).SetData chConstants.chDimValues,chConstants.chDataBound, "C2:C5"

' Series two contains sales growth data for 2000.
ChartSpace1.Charts(0).SeriesCollection(2).SetData chConstants.chDimSeriesNames, chConstants.chDataBound, "D1"
ChartSpace1.Charts(0).SeriesCollection(2).SetData chConstants.chDimCategories, chConstants.chDataBound, "A2:A5"
ChartSpace1.Charts(0).SeriesCollection(2).SetData chConstants.chDimValues, chConstants.chDataBound, "D2:D5"

' Make the chart legend visible, format the left value axis as percentage,
' and specify that value gridlines are at 10% intervals.
ChartSpace1.Charts(0).HasLegend = True
ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionLeft).NumberFormat = "0%"
ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionLeft).MajorUnit = 0.1
End Sub
</script>
只要你装了office,office下就会有帮助资料,在你的机器上搜索OWC*.chm你就会找到很多。

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧