Hi Connor,
Thank you for your message in this forum.
If you want to convert .xls file to .xlsx file and you don’t have may .xls files, we’d give you some workarounds and hope that will help you:
- When you open older format files, you will see "Compatibility Mode" in the title bar after the file name. You can use the "convert" function. Click on the Office button, then Convert. You can also try opening the .xls file in Excel > then use the Save As command to save as an "Excel Workbook". Once you select that file type, the file extension will be xlsx and you can delete the old xls version. For more details, you can refer to this article: Save a workbook in another file format
- At the same time, you mentioned “migrated clients data over to SharePoint”, actually, if you upload the .xls files to SharePoint library, if you open it in Excel Online, you an click Edit Workbook, as shown below:
Then you can select Edit in Browser, there will show a File conversion message, as shown below:
You can click Convert to convert the file to the .xlsx file.
At the same time, according to your description, it seems that you are using Office Migration Planning Manager to convert files. If you have many .xls files and you still want to use Office Migration Planning Manager, to make sure you get the professional help, we would like to suggest you post it in Technet community to get professional help. This is a special channel handling Office Migration Planning Manager related issues and queries.
Your understanding and patience will be highly appreciated.
Best Regards,
Sukie
Hi Connor,
Thank you for your message in this forum.
If you want to convert .xls file to .xlsx file and you don’t have may .xls files, we’d give you some workarounds and hope that will help you:
- When you open older format files, you will see "Compatibility Mode" in the title bar after the file name. You can use the "convert" function. Click on the Office button, then Convert. You can also try opening the .xls file in Excel > then use the Save As command to save as an "Excel Workbook". Once you select that file type, the file extension will be xlsx and you can delete the old xls version. For more details, you can refer to this article: Save a workbook in another file format
- At the same time, you mentioned “migrated clients data over to SharePoint”, actually, if you upload the .xls files to SharePoint library, if you open it in Excel Online, you an click Edit Workbook, as shown below:
Then you can select Edit in Browser, there will show a File conversion message, as shown below:
You can click Convert to convert the file to the .xlsx file.
At the same time, according to your description, it seems that you are using Office Migration Planning Manager to convert files. If you have many .xls files and you still want to use Office Migration Planning Manager, to make sure you get the professional help, we would like to suggest you post it in Technet community to get professional help. This is a special channel handling Office Migration Planning Manager related issues and queries.
Your understanding and patience will be highly appreciated.
Best Regards,
Sukie
Hi Connor,
Thank you for posting back. I do understand the inconvenience it has made and apologize for it.
As I mentioned above, I gave you two workarounds. However, if you want to convert .xls files to .xlsx file in bulk, we’re afraid that there is no out of box way to achieve that. You may need to refer to the advice of Office support to use those tools. According to your description, it seems that you encounter the problem when you use the tool to convert files.
However, as this category is dedicated to the queries about Office 365 products,
to make sure you get the professional help, we would like to suggest you post it in Technet community to get professional help. This is a special channel handling Office Migration Planning Manager and Microsoft Office Compatibility Pack related issues and queries.
We appreciate your understanding and precious time.
Best Regards,
Sukie
python - how to convert xls to xlsx - Stack Overflow
Converting .xls to .xlsx
Converting .xls to .xlsx using xlrd
Convert XLS to XLSX using VBA
How do I convert XLS to XLSX without opening the file?
Will my formulas still work after converting XLS to XLSX?
Is there any data loss when converting from XLS to XLSX?
Videos
You need to have win32com installed on your machine. Here is my code:
import win32com.client as win32
fname = "full+path+to+xls_file"
excel = win32.gencache.EnsureDispatch('Excel.Application')
wb = excel.Workbooks.Open(fname)
wb.SaveAs(fname+"x", FileFormat = 51) #FileFormat = 51 is for .xlsx extension
wb.Close() #FileFormat = 56 is for .xls extension
excel.Application.Quit()
Just wrapped the code above in a function together with better path handling to make sure the excel process is getting closed.
from pathlib import Path
import win32com.client as win32
def convert_xls_to_xlsx(path: Path) -> None:
excel = win32.gencache.EnsureDispatch('Excel.Application')
wb = excel.Workbooks.Open(path.absolute())
# FileFormat=51 is for .xlsx extension
wb.SaveAs(str(path.absolute().with_suffix(".xlsx")), FileFormat=51)
wb.Close()
excel.Application.Quit()
Here is my solution, without considering fonts, charts and images:
$ pip install pyexcel pyexcel-xls pyexcel-xlsx
Then do this::
import pyexcel as p
p.save_book_as(file_name='your-file-in.xls',
dest_file_name='your-new-file-out.xlsx')
If you do not need a program, you could install one additinal package pyexcel-cli::
$ pip install pyexcel-cli
$ pyexcel transcode your-file-in.xls your-new-file-out.xlsx
The transcoding procedure above uses xlrd and openpyxl.