EXCELCNV.EXE Lag Time

jamiers

New Member
Joined
May 20, 2007
Messages
13
Hi All,

For about 24 months, I have been using the EXCELCNV.EXE command line program to convert XLS files to XLSX files so that I can use them in Power BI as datasets. I use a series of batch scripts to convert Excel files that are downloaded from my web application (that I cannot make the Excel file come down as xlsx).

33% of the time over those 24 months, excelcnv.exe worked instantaneously on file conversions.
66% of the time the conversion takes FOREVER (really, between 3-5 minutes).
The files themselves haven't grown in size. They are about the same size as they were 24 months ago.

It is maddening. In the beginning, it worked quickly, then a MS update pushed down and it the conversion lagged. Then a new update would come down and it went back to instantly again. I am now in a long period of the LONG conversions. Repairing MS Office hasn't done anything and a reinstall hasn't either.

I have done searching over the Internet and haven't found anyone experiencing this problem. Anyone have any ideas? (I put this in Excel because it is a file that comes with Excel, but if you think I should put it in the Power Tools forum, I can do that too).

Thanks!
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
If you are using version 2007 or later, this is the default. Would it not be eaiser to open and save each file. Or would that not be possible?
 
Upvote 0
I am using Office 365 Desktop version... 10 files per day is a lot to open each one and then resave them. The automation of the scripts makes sure that I am naming them the right thing and then moving them to the right folder so Power BI can pick them up. The tools are used by many.
 
Upvote 0
Have you tried using Power Automate, which is in the 365 Suite?
 
Upvote 0
Here is some VBA that will prompt the user to choose a folder. In my testing I had 2 subfolders in the main folder, 'Original' and 'After'. You would need to adjust those folder names.

The code looks at all the files and if it has a file type of '.xls', it will copy the file to the 'After' folder as a '.xlsx'.

VBA Code:
Sub renameFiles()
Dim Root As String:     Root = folderName()
If Root <> "" Then
    Dim FSO As Object:              Set FSO = CreateObject("Scripting.FileSystemObject")
    Dim fileLocation As String:     fileLocation = "\Original\"
    Dim newLocation As String:      newLocation = "\After\"
    Dim SP() As String
    Dim Fol As Object, fil As Object
    
    Set Fol = FSO.getfolder(Root & fileLocation)
    
    For Each fil In Fol.Files
        SP = Split(fil.Name, ".")
        If SP(UBound(SP)) = "xls" Then
            FileCopy Root & fileLocation & fil.Name, Root & newLocation & Left(fil.Name, InStrRev(fil.Name, ".") - 1) & ".xlsx"
        End If
    Next fil
End If

End Sub

Function folderName()
Dim result As String

With Application.FileDialog(msoFileDialogFolderPicker)
    If .Show = -1 Then folderName = .SelectedItems(1)
End With
End Function
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,399
Members
448,958
Latest member
Hat4Life

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top