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