Skip to content

Instantly share code, notes, and snippets.

@tmaeda
Created December 28, 2010 11:23
Show Gist options
  • Save tmaeda/757146 to your computer and use it in GitHub Desktop.
Save tmaeda/757146 to your computer and use it in GitHub Desktop.
Ruby win32ole で Range に セル範囲名
require 'win32ole'
excel = WIN32OLE.new('Excel.Application')
excel.visible = TRUE
workbook = excel.Workbooks.Add();
worksheet = workbook.Worksheets(1);
worksheet.Range("A1:C1").Name = "hani"
worksheet.Range("hani").value = [1,2,3]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment