Excel libraries for C#

OleDbConnection

Very convenient because you can manipulate an Excel file as if it is a DBMS. However, OleDbConnection dosen’t support special behaviors like adding a color to a cell. MDAC(OleDbConnection needs it) also dosen’t support x64 or ‘ANY CPU’ platform.

Microsoft.Office.Interop.Excel

Office components should be installed. If your application use this, it should be built for x86 platform. Other platforms are not supported by Office components.

OpenXml SDK

Merits

  • supports special behaviors

  • supports x86, x64, and ‘ANY CPU’ platforms

Demerits

  • Using OpenXml SDK is not easy because references and resources are rare. Sometimes XML manipulation is required.
  • Currently, OpenXml SDK only supports Office 2007.

Useful Resources

How to create an Excel file

How to access records of an Excel file

최 재훈

블로그, 페이스북, 트위터 고성능 서버 엔진, 데이터베이스, 지속적인 통합 등 다양한 주제에 관심이 많다.
Close Menu