Link to home
Start Free TrialLog in
Avatar of Nithya Kovuru
Nithya Kovuru

asked on

Need to convert the file extension from .xls to .xlsx using batch script

Hi All,

With the help of batch script i can rename the file extension but the original format remains same.Is there any command to open the
(.xls) files automatically from a folder and save it to (.xlsx) format without any manual intervention.

Please suggest.

Thanks,
Nithya
Avatar of Qlemo
Qlemo
Flag of Germany image

Nothing built-in. You need to load the file into the application, then save as a different file type. This can be done with Office Automation, using VB Script or PowerShell.
Is it something you have to do a lot and all the time?
SOLUTION
Avatar of Hello There
Hello There

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Or you can just used libreoffice --headless, which allows conversion between any of the many formats LibreOffice understands.
I don't consider #a42408753 a suitable solution. Being VBA code, you have to implement that in any Office application, which is much over the top here. Using VBS as in #a42409005 is suitable in general, and I would agree to accept that, as it would work well enough to be useful.
Avatar of Hello There
Hello There

From my personal conversation with Community Support Moderator:

In inactive question if other answers are possible and helpful with potential and possible solution, they should be marked.
Please provide your recommendations of how you feel this question should be closed. When doing so, be sure to include the CommentID of each comment, as well as a short explanation of why those comments should be considered a solution.
In this case I believe that #a42409005 is the right solution to be accepted.  It meets the authors need and can be easily run in a batch mode as requested by the author.  While #a42408753 is another approach, since it uses a VBA approach it requires manual intervention to execute, and would not match the request for a scripted batch approach as well, for this particular question.

At the end of the day it would be great if the author could revisit and guide the closure property, but without that a moderator will have to make this judgement call.


»bp
#a42409005 suggestion is maybe more suitable but #a42408753 suggestion is a possible solution as well.