Excel파일 Read/Write 방법
1. Markup을 직접 write하는 방법
2. Control의 Export를 활용하는 방법
- 3rd party tool 등을 이용하여, 간접적으로 구현하는 방식
3. Office ref
- office dll을 reference로 잡아서 개발하는 방식
4. Office Open Xml
- Xml형태로 word, excel, powerpoint를 다룸
OpenXml SDK 선택의 당위성
다른 선택지와 명확하게 차별되는 요소를 정리하면 다음과 같습니다.
Fully support
이를 테면 다음과 같은 output을 만들 수 있습니다.
Elegant code
As-is
To-be
Excel to recognize the file right away.
1, 2번의 경우는 위와 같은 file 형식이 올바르지 않다는 경고를 사용자가 보게 됩니다. Open Xml로 file을 다루는 경우에는 format을 명확하게 준수하므로 이러한 경고 없이 사용할 수 있습니다.
Reference
http://openxmldeveloper.org/
http://www.codeproject.com/Articles/42628/Using-ASP-NET-MVC-and-the-OpenXML-API-to-Stream-Ex
http://stackoverflow.com/questions/5115257/open-xml-excel-read-cell-value
http://msdn.microsoft.com/en-us/library/hh180830(v=office.14).aspx
'Programming > XML' 카테고리의 다른 글
Export excel file via Asp.NET MVC, using OpenXml (0) | 2015.09.08 |
---|---|
BOM issue (65279 '') (0) | 2014.11.25 |
XML vs. Json comparison (0) | 2014.07.22 |
XML Element vs. Attribute (1) | 2014.06.30 |