Created
June 28, 2011 03:56
-
-
Save xnrghzjh/1050457 to your computer and use it in GitHub Desktop.
Excel2007,2010でxlsファイルを保存する時に出る互換性チェクを無効にする。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.codehaus.groovy.scriptom.* | |
Scriptom.inApartment | |
{ | |
excel = new ActiveXObject('Excel.Application') | |
fileList = ["Book1.xls"] // TODO:カレントからxlsファイルを取得する処理 | |
fileList.each() { | |
book = excel.workbooks.open(new File(it).canonicalPath) | |
book.CheckCompatibility = false | |
book.Save | |
excel.quit() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment