[exerb-dev] Excel+Win32OLE+exerb

Back to archive index

Shiro Soga shiro****@sogas*****
2002年 10月 23日 (水) 21:58:58 JST


曽我です。

以下のコードで再現可能でした。

Sheet1をそのまま使うか、新規に作るかを変えると(コメントのところです)、
落ちる場所が変わっていったりしました。。。。

require 'win32ole'

excel = WIN32OLE.new('Excel.Application')
sheet = excel.workbooks.add.worksheets(1)
#sheet = excel.workbooks.add.worksheets.add

excel.visible = true
excel.interactive = true
a = "A"
1.upto(100) do
  1.upto(100) do |i|
    sheet.range("#{a}#{i}").value = i
  end
  a.succ!
end
excel.quit

----------------------------------------------------------------------
そがし(曽我 四郎)       E-Mail: shiro****@sogas*****



exerb-developer メーリングリストの案内
Back to archive index