2010-07-15 57 views
0

我如何可以轉換大量的'97 Excel文件'95。我尋找其他解決方案作爲文件 - 另存爲。轉換大量的Excel文件

+0

你真的說1997年至1995年的格式?那真是太老了,找工具很難。 – 2010-07-15 19:50:08

+0

是的,它的嚴重性,我的matlab只能處理'95 – 2010-07-15 22:51:21

+0

,因爲你正在使用Matlab,你可以使用.csv文件嗎?這樣你就不會被綁定到一個特定的Excel版本。 – 2010-07-15 22:57:22

回答

0

,我發現這個蘋果腳本:

set theFolder to choose folder with prompt "Choose the folder that contains your Excel files" 
tell application "Finder" to set theFiles to (files of theFolder) 
set fileCount to count theFiles 
repeat with i from 1 to fileCount 
    set fName to text 1 thru -5 of ((name of item i of theFiles) as text) 
    if ((name of item i of theFiles) as text) ends with ".xls" then 
     set tName to (theFolder as text) & fName & ".xls" 
     tell application "Microsoft Excel" 
      activate 

      open (item i of theFiles) as text 

      tell active workbook 
       save workbook as filename tName file format Excel7 file format with overwrite 
      end tell 

      close active workbook without saving 
     end tell 
    end if 
end repeat 
2

錄製宏並展開生成的VBA代碼可以根據需要,例如在給定文件夾中打開的所有.xls文件,並將它們轉換成一個又一個,等等可能無法提供最好的性能,但開發時間應該在1小時,也許更少。

+0

與我最近爲了將Word文件轉換爲PDF而給出的答案類似。鏈接中有代碼:http://superuser.com/questions/163217/is-there-a-free-batch-doc-to-pdf-converter-out-there/163221#163221 – 2010-07-15 19:52:35