in reply to WIN32::OLE Excel Save As

sir while i m trying to use Save As it gives me error

i use all modules that used in your code but still not working

i want to save my .xls file to .xlsx file

code: $book->SaveAs({Filename =>'D:\bharat\xxx.xls',FileFormat => xlExcel3}) +; error/warning message: Unable to get the SaveAs property of the Workbook class Win32::OLE(0.1712) error 0x800a03ec in METHOD/PROPERTYGET "SaveAs" at C:\Users\training\Desktop\New\ts +t.pl line 57.

while it is working if i use this line

$book->SaveAs( 'D:\bharat\test.xls');

Replies are listed 'Best First'.
Re^2: WIN32::OLE Excel Save As
by vasarabharat (Novice) on Mar 25, 2015 at 06:13 UTC

    Need small change in filename

    just put the filename outside the curlybrace

    Example : $book->SaveAs( PATH/filenm.xlsx,{FileFormat => xlWorkbookDefault});

    Works well with my ceode.. best of luck