Successfully reported this slideshow.
Your SlideShare is downloading. ×

現在のCOM事情

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Upcoming SlideShare
1.7 functional programming
1.7 functional programming
Loading in …3
×

Check these out next

1 of 40 Ad
Advertisement

More Related Content

Advertisement

Recently uploaded (20)

Advertisement

現在のCOM事情

  1. 1. Component Object Model COM COM .NET Framework .NET COM Visual Basic ASP
  2. 2. Excel.Application excelApp = new Excel.Application(); Excel.Workbook excelBook = (Excel.Workbook)(oXls.Workbooks.Open(@"C:tmp dummy.xls",...)); Excel.Worksheet excelSheet = (Excel.Worksheet)excelBook.Sheets[1]; Excel.Range excelRange = (Excel.Range)excelSheet.Cells[1,1]; String name = excelRange.Text.ToString();
  3. 3. try { excelCells = excelSheet.Cells; try { excelRange = (Excel.Range)excelCells[1,1]; msg = excelRange.Text.ToString(); } finally { Marshal.ReleaseComObject(excelRange); } } finally { Marshal.ReleaseComObject(excelCells); }

×