【发布时间】:2011-05-16 07:57:21
【问题描述】:
请您帮我实现数据透视图的自动化,下面是我编写的代码。我目前无法创建图表
require "rubygems"
# require "watir" # Commented out by editor to the question, not by the OP
require 'win32ole'
excel=WIN32OLE.new("Excel.Application")
excel.visible=true
work_book=excel.Workbooks.Open("C:\\VAMSI\\PIVOTAL_CHART_CODE\\pivotal.xlsx")
worksheet = work_book.worksheets(1)
worksheet.range("a1").select
autoit= WIN32OLE.new("AutoItX3.Control")
autoit.Send("!n")
autoit.Send("!v")
autoit.Send("!t")
autoit.Send("{ENTER}")
【问题讨论】:
标签: ruby excel autoit win32ole