Batch convert .xls to .xlsx
Ran into an issue today where a colleague needed to convert a bunch of .xls files in subfolders to .xlsx. Found a script as follows on superuser.com and slightly modified it to save in the source folder:
Get-ChildItem -Recurse *.xls | ForEach-Object {&"C:\Program Files\LibreOffice\program\soffice.com" --convert-to xlsx --outdir $_.Directory $_.FullName}This will recursively search the base directory it's run in as well as any subdirectories and pass each .xls file to soffice.com to convert to .xlsx and place it next to the original file. Useful!