Skip to main content

How to convert multiple xls files to xlsx files in Excel?

To convert an old xls Excel file to a new xlsx file, you can apply the Save As feature in Excel, but, if there are multiple xls files needed to be converted, how could deal with this task quickly and easily?


Convert multiple xls formats to xlsx formats with Save As function one by one

The Save As function in Excel can help you convert the old workbook’s xls format to new xlsx format one by one.

1. Open your workbook that you want to convert its format.

2. Click File > Save As, and a Save As dialog will display, specify a folder to place the new format of the file, and then click Save as type drop down list to choose Excel Workbook, see screenshot:

3. Then click Save button to close the dialog, and this Excel format has been converted from xls to xlsx.

Tips: With this Save As function, you just only convert one Excel file at a time, if you have hundreds of Excel files need to be converted, this method is not a good choice.

Convert multiple xls formats to xlsx formats at once with VBA code

If you want to convert multiple xls files to xlsx files at once without saving one by one, here, I will talk about a VBA code for you, please do with the following steps:

1. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste the following code in the Module Window.

VBA code: Convert multiple xls formats to xlsx formats at once

Sub ConvertToXlsx()
'Updateby Extendoffice
Dim strPath As String
Dim strFile As String
Dim xWbk As Workbook
Dim xSFD, xRFD As FileDialog
Dim xSPath As String
Dim xRPath As String
Set xSFD = Application.FileDialog(msoFileDialogFolderPicker)
With xSFD
.Title = "Please select the folder contains the xls files:"
.InitialFileName = "C:\"
End With
If xSFD.Show <> -1 Then Exit Sub
xSPath = xSFD.SelectedItems.Item(1)
Set xRFD = Application.FileDialog(msoFileDialogFolderPicker)
With xRFD
.Title = "Please select a folder for outputting the new files:"
.InitialFileName = "C:\"
End With
If xRFD.Show <> -1 Then Exit Sub
xRPath = xRFD.SelectedItems.Item(1) & "\"
strPath = xSPath & "\"
strFile = Dir(strPath & "*.xls")
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Do While strFile <> ""
If Right(strFile, 3) = "xls" Then
Set xWbk = Workbooks.Open(Filename:=strPath & strFile)
xWbk.SaveAs Filename:=xRPath & strFile & "x", _
FileFormat:=xlOpenXMLWorkbook
xWbk.Close SaveChanges:=False
End If
strFile = Dir
Loop
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub

3. Then, press F5 key to run this code, and a window will be displayed, please select a folder which contains the xls files that you want to convert, see screenshot:

4. Then,click OK, another window is popped out, please select a folder path where you want to output the new converted files, see screenshot:

5. And then, clik OK, after finishing the conversion, you can go to the specified folder to preview the converted result, see screenshots:


Convert multiple xls formats to xlsx formats at once with a powerful feature

With this Kutools for Excel’s Format Converter utility, you can convert multiple xls formats to xlsx formats or vise versa, it also can help you convert multiple workbooks to PDF files at one.

Note:To apply this Format Converter, firstly, you should download the Kutools for Excel, and then apply the feature quickly and easily.

After installing Kutools for Excel, please do as this:

1. Click Kutools Plus > Workbook > Format Converter, see screenshot:

2. And a promt box will pop out to remind you must close the workbook that you want to convert. See screenshot:

3. Click OK, then, in the File Format Converter dialog, specify the following options:

  • Under the Convert type drop down list, select Excel 97-2003 to Excel 2007 or higher;
  • Then click Add button to add the xls files that you want to convert, you can add the workbooks from your computor disk or OneDrive as you need;

4. After inserting the xls files, still in the File Format Converter dialog box, please click button to choose one folder path to output the converted files, and then specify some operations you need at the bottom of the dialog box, see screenshot:

Notes: In the above dialog box:
  • If the workbooks in the subfolders needed to be converted as well, please check the Include subfolders when adding folders check box;
  • If you want to remove the original files after converting, please check the Delete source files after conversion box;
  • If you want to keep the modified date of original files, please check the Keep modified date of original files box;
  • The directory structure of the file can be retained by checking the The directory structure of the file is preserved when converted box;

5. Then click OK to start converting, after finishing the conversion, you can go to the specific folder to preview the converted result. See screenshots:

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

Description


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
Comments (4)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Please could you change the VBA code so that it looks in subfolders of the chosen folder.
Could it also output a log file to show everything its converted?
This comment was minimized by the moderator on the site
Thank You!
This comment was minimized by the moderator on the site
Thanks so much for the VBA CODE. Very Useful
This comment was minimized by the moderator on the site
Can you save a xls as a xlsx and maintain 1,048,576 rows and XFD Columns?
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations