2013-10-28 1 views
0

새 Excel 2007/2010/2013 () 사이를 변환하는 방법이 있습니까? xlsx) 파일 형식과 Softartisans ExcelWriter .NET 라이브러리를 사용하는 이전 2007 이전 ( .xls) 형식을 지원합니다.Softartisans ExcelWriter를 사용하여 Excel 2007 Open XML (* .xlsx)을 레거시 형식 파일 (* .xls, 예 : Excel 97)로 변환하는 방법

이 코드 :

ExcelApplication application = new ExcelApplication(); 
Workbook workbook = application.Open("NewFormatFile.xlsx"); 
application.Save(workbook, "OldFormatFile.xls"); 

오류 다음 제공 :

This workbook is a workbook without macros and must be saved with the .xlsx extension, but filename was OldFormatFile.xls 
+0

, 당신은 interop 어셈블리를 사용할 수 있으며에 저장 .xls 형식. 그러나 매크로가 작동하는지 확실하지 않습니다. –

답변

0

불행하게도, 당신이 ExcelApplication 또는 ExcelTemplate와 XLS에 XLSX 변환 할 수 없습니다.

은 템플릿 개체 열기() 메소드 문서에 기록되고, 같은 응용 프로그램 개체에 대한 적용이 간단한 통합 문서의 경우

http://wiki.softartisans.com/display/EW8/ExcelTemplate.Open(System.IO.Stream)

+0

감사합니다. 필자는 템플릿 작성에 관심이 없었기 때문에 ExcelApplication 개체 만 보았습니다. – user1992449

+0

문제가 없지만 설명서가 업데이트되었음을 ​​확인합니다. – srosario1