Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

現在のCOM事情

1,215 views

Published on

Published in: Technology
  • Be the first to comment

現在の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); }

×