我试图每个片材(保存在工作簿foo
, bar
, baz
)作为一个单独的HTML文档( foo.html
, bar.html
, baz.html
):
set theDirectory to (path to desktop as text) & "Output:"
set theSource to choose file with prompt "Choose file:" default location "/Users/<user>/Desktop/" of type {"XLS", "XLSX"}
tell application "Microsoft Excel"
activate
set theWorkbook to open theSource
set theSheets to every sheet of active workbook
repeat with theSheet in theSheets
set theDestination to theDirectory & (the name of theSheet) & ".html"
log theDestination
tell theSheet
save as sheet filename theDestination file format HTML file format
end tell
end repeat
quit saving no
end tell
这个结果:
在一个文件夹中
Output
对于每个片材(命名为<sheet name>_files
包含一个HTML文档的每个片材(命名)sheet<n>.html
),再加上一些附加的文件(filelist.xml
,stylesheet.css
,tabstrip.html
)在文件
Output
对于每个片(名为.html`)引用该对应的文件夹
如何纠正呢?