''OWC1.VBS class owc private o '傳入物件 public sub create(id_,width_,height_,location_) Set o = document.createElement("object") o.setAttribute "id",id_ o.setAttribute "classid","CLSID:0002E55D-0000-0000-C000-000000000046" o.setAttribute codebase="owc11.dll" o.style.width=width_ o.style.height=height_ document.getElementById(location_).appendChild(o) end sub '畫圖矩形圖 'chart_bgcolor_圖表的背景顏色 'chartCaption_圖表的標題 'chartCaption_fontColor_圖表標題顏色 'Interior_Color_矩形內的填充顏色 'Caption_名稱 'categories_名稱數組 'values_值數組串 public sub bar(chart_bgcolor_,chartCaption_,chartCaption_fontColor_,Interior_Color_,Caption_,categories_,values_) o.Clear set cht = o.Charts.Add set c = o.Constants cht.Type = c.chChartTypeColumnClustered '設背景色或是填充 o.Charts(0).PlotArea.Interior.SetSolid chart_bgcolor_