現在のCOM事情

1,106 views
1,024 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,106
On SlideShare
0
From Embeds
0
Number of Embeds
82
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

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

×