#### Save As .prn file
$Book1->SaveAs({Filename =>'C:\xxxx\xxxx\xxx.prn',
FileFormat => xlTextPrinter});
for .xlsm what Fileformat we need to specify ?
| [reply] |
Unless your Excel 2003 knows how to save the spreadsheet data in .xslm format you must have Excel 2007 installed.I had a quick check on CPAN and it seems there is no module available that allows you to save in .xslm format.
CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
| [reply] [d/l] [select] |
Although the advice to search on MSDN is a good one, sometimes MS does its best to obfuscate information. As a service to all, I rummaged about and managed to find the definition of the XlFileformat Enumeration (aka, the options you would use in scripting via VBA or Win32::OLE to save):
http://msdn.microsoft.com/en-us/library/bb241279.aspx
I think the one you want for xlsm is xlOpenXMLWorkbookMacroEnabled
| [reply] [d/l] |
Thanks to all , it worked when i specifed FileFormat => 52.
Ya string "xlOpenXMLWorkbookMacroEnabled" instead of 52 should also work.
And yes we require MS 2007 installed.
| [reply] |