SlideShare a Scribd company logo
1 of 40
Component Object Model   COM




COM                  .NET Framework
        .NET                          COM   Visual
Basic   ASP
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();
try {
     excelCells = excelSheet.Cells;
     try {
         excelRange = (Excel.Range)excelCells[1,1];
         msg = excelRange.Text.ToString();
     } finally {
         Marshal.ReleaseComObject(excelRange);
     }
} finally {
     Marshal.ReleaseComObject(excelCells);
}
現在のCOM事情
現在のCOM事情
現在のCOM事情
現在のCOM事情
現在のCOM事情
現在のCOM事情
現在のCOM事情
現在のCOM事情
現在のCOM事情
現在のCOM事情
現在のCOM事情
現在のCOM事情
現在のCOM事情
現在のCOM事情

More Related Content

What's hot

What's hot (6)

Rx – reactive extensions
Rx – reactive extensionsRx – reactive extensions
Rx – reactive extensions
 
C program to insert a node in doubly linked list
C program to insert a node in doubly linked listC program to insert a node in doubly linked list
C program to insert a node in doubly linked list
 
Doubly linked list (animated)
Doubly linked list (animated)Doubly linked list (animated)
Doubly linked list (animated)
 
Clauses
ClausesClauses
Clauses
 
Sql FUNCTIONS
Sql FUNCTIONSSql FUNCTIONS
Sql FUNCTIONS
 
Functional Programming with Javascript
Functional Programming with JavascriptFunctional Programming with Javascript
Functional Programming with Javascript
 

Viewers also liked

Trinidad And Tobago
Trinidad And TobagoTrinidad And Tobago
Trinidad And Tobagoellenmc
 
Trinidad & Tobago, spreekbeurt
Trinidad & Tobago, spreekbeurtTrinidad & Tobago, spreekbeurt
Trinidad & Tobago, spreekbeurthschraven
 
Trinidad And Tobago Slideshow
Trinidad And Tobago SlideshowTrinidad And Tobago Slideshow
Trinidad And Tobago Slideshowaskmk24
 
Know Your Community - Know Your World Trinidad tobago-ramjt
Know Your Community - Know Your World Trinidad tobago-ramjtKnow Your Community - Know Your World Trinidad tobago-ramjt
Know Your Community - Know Your World Trinidad tobago-ramjtShannon Anicas
 
Trinidad and tobago
Trinidad and tobagoTrinidad and tobago
Trinidad and tobagogeffmel17
 

Viewers also liked (7)

Trinidad And Tobago
Trinidad And TobagoTrinidad And Tobago
Trinidad And Tobago
 
Trinidad & Tobago, spreekbeurt
Trinidad & Tobago, spreekbeurtTrinidad & Tobago, spreekbeurt
Trinidad & Tobago, spreekbeurt
 
Trinidad And Tobago Slideshow
Trinidad And Tobago SlideshowTrinidad And Tobago Slideshow
Trinidad And Tobago Slideshow
 
Know Your Community - Know Your World Trinidad tobago-ramjt
Know Your Community - Know Your World Trinidad tobago-ramjtKnow Your Community - Know Your World Trinidad tobago-ramjt
Know Your Community - Know Your World Trinidad tobago-ramjt
 
Trinidad and tobago
Trinidad and tobagoTrinidad and tobago
Trinidad and tobago
 
Trinidad and Tobago
Trinidad and TobagoTrinidad and Tobago
Trinidad and Tobago
 
Trinidad
TrinidadTrinidad
Trinidad
 

More from demuyan

ソフトウェア開発の歴史を振り返る
ソフトウェア開発の歴史を振り返るソフトウェア開発の歴史を振り返る
ソフトウェア開発の歴史を振り返るdemuyan
 
低レイヤー入門
低レイヤー入門低レイヤー入門
低レイヤー入門demuyan
 
GDKとLLVM(横浜PF部向け)
GDKとLLVM(横浜PF部向け)GDKとLLVM(横浜PF部向け)
GDKとLLVM(横浜PF部向け)demuyan
 
組込Android本の執筆環境
組込Android本の執筆環境組込Android本の執筆環境
組込Android本の執筆環境demuyan
 
ゲーム屋的パフォーマンスチューニング
ゲーム屋的パフォーマンスチューニングゲーム屋的パフォーマンスチューニング
ゲーム屋的パフォーマンスチューニングdemuyan
 
Linuxカーネルから紐解くAndroid
Linuxカーネルから紐解くAndroidLinuxカーネルから紐解くAndroid
Linuxカーネルから紐解くAndroiddemuyan
 
基礎から学ぶ組み込みAndroid
基礎から学ぶ組み込みAndroid基礎から学ぶ組み込みAndroid
基礎から学ぶ組み込みAndroiddemuyan
 
Android&Web&Titanium
Android&Web&TitaniumAndroid&Web&Titanium
Android&Web&Titaniumdemuyan
 
Gdgd発表スライド
Gdgd発表スライドGdgd発表スライド
Gdgd発表スライドdemuyan
 
Android & BeagleBoardで組込入門
Android & BeagleBoardで組込入門Android & BeagleBoardで組込入門
Android & BeagleBoardで組込入門demuyan
 
AppBank 村井氏 講演資料
AppBank 村井氏 講演資料AppBank 村井氏 講演資料
AppBank 村井氏 講演資料demuyan
 
Androidとは。ちょっと変った視点から
Androidとは。ちょっと変った視点からAndroidとは。ちょっと変った視点から
Androidとは。ちょっと変った視点からdemuyan
 
いまさら聞けないRuby1.9
いまさら聞けないRuby1.9いまさら聞けないRuby1.9
いまさら聞けないRuby1.9demuyan
 
Yet Another Development Language
Yet Another Development LanguageYet Another Development Language
Yet Another Development Languagedemuyan
 

More from demuyan (14)

ソフトウェア開発の歴史を振り返る
ソフトウェア開発の歴史を振り返るソフトウェア開発の歴史を振り返る
ソフトウェア開発の歴史を振り返る
 
低レイヤー入門
低レイヤー入門低レイヤー入門
低レイヤー入門
 
GDKとLLVM(横浜PF部向け)
GDKとLLVM(横浜PF部向け)GDKとLLVM(横浜PF部向け)
GDKとLLVM(横浜PF部向け)
 
組込Android本の執筆環境
組込Android本の執筆環境組込Android本の執筆環境
組込Android本の執筆環境
 
ゲーム屋的パフォーマンスチューニング
ゲーム屋的パフォーマンスチューニングゲーム屋的パフォーマンスチューニング
ゲーム屋的パフォーマンスチューニング
 
Linuxカーネルから紐解くAndroid
Linuxカーネルから紐解くAndroidLinuxカーネルから紐解くAndroid
Linuxカーネルから紐解くAndroid
 
基礎から学ぶ組み込みAndroid
基礎から学ぶ組み込みAndroid基礎から学ぶ組み込みAndroid
基礎から学ぶ組み込みAndroid
 
Android&Web&Titanium
Android&Web&TitaniumAndroid&Web&Titanium
Android&Web&Titanium
 
Gdgd発表スライド
Gdgd発表スライドGdgd発表スライド
Gdgd発表スライド
 
Android & BeagleBoardで組込入門
Android & BeagleBoardで組込入門Android & BeagleBoardで組込入門
Android & BeagleBoardで組込入門
 
AppBank 村井氏 講演資料
AppBank 村井氏 講演資料AppBank 村井氏 講演資料
AppBank 村井氏 講演資料
 
Androidとは。ちょっと変った視点から
Androidとは。ちょっと変った視点からAndroidとは。ちょっと変った視点から
Androidとは。ちょっと変った視点から
 
いまさら聞けないRuby1.9
いまさら聞けないRuby1.9いまさら聞けないRuby1.9
いまさら聞けないRuby1.9
 
Yet Another Development Language
Yet Another Development LanguageYet Another Development Language
Yet Another Development Language
 

Recently uploaded

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 

Recently uploaded (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 

現在のCOM事情

  • 1.
  • 2.
  • 3.
  • 4. Component Object Model COM COM .NET Framework .NET COM Visual Basic ASP
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18. 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();
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26. try { excelCells = excelSheet.Cells; try { excelRange = (Excel.Range)excelCells[1,1]; msg = excelRange.Text.ToString(); } finally { Marshal.ReleaseComObject(excelRange); } } finally { Marshal.ReleaseComObject(excelCells); }