convert xls to xlsm using excelcnv.exe

旧街凉风 提交于 2019-12-07 17:33:57

问题


i had create one console application. and use the microsoft ppcnvcom.exe, excelcnv.exe, wordconv.exe to convert the doc to docx, xls to xlsx and ppt to pptx.

but can anyone know this how to convert xls to xlsm?

OFC.exe is the one choice but when i called it from sharepoint it not converted successfully.some security issu is block the converter. OFC.exe automatically identify if xls have a macro in it then it convert to xlsm file.

but i want this using excelcnv.exe ?

have any idea?


回答1:


Unfortunately, no, you can't do this with excelcnv.exe as it requires a file name. It would be wonky to name all your .xls files as .xlsm and then go through 1 by 1 to figure out which ones don't have macros.

Based on your comments, you've tried using OFC.exe, which is a much better way of going about this for what you're looking for. We should focus efforts on that instead. What exactly is the error you are receiving and how are you configuring your .INI file? (see http://blogs.msdn.com/b/ericwhite/archive/2008/09/19/bulk-convert-doc-to-docx.aspx for an example).

You have to use the Process class to run OFC.exe and then pass in the right command line arguments to point to your INI file.


EDIT: 2011-03-11: I guess if no more details are forthcoming to help troubleshoot this, I'll stick by the answer in the first paragraph as answering the OP's question: ...you can't do this with excelcnv.exe as it requires a file name.




回答2:


You could try: http://sourceforge.net/projects/b2xtranslator/ instead



来源:https://stackoverflow.com/questions/5192511/convert-xls-to-xlsm-using-excelcnv-exe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!