Goal of this post
This post aims at providing a step by step solution to an uncommon error which could happen when you try to import an Excel file to a SharePoint 2007 custom list.
Problematic overview
The "Import to a SharePoint List" feature is usually used to create and fill a custom list from an Excel source file.
For an unknown reason, this feature may not work properly on some client workstations whatever the version of SharePoint and Office Excel used. During the import step, the site designer receives the following error message box:

Solution
First we have to point out that this error isn't caused by SharePoint but by Ms Excel, and that the fix will have to be executed on each client workstation - at least site designers workstations - because standard users are not impacted by this error.
The issue will be fixed in two steps: first we need to edit the EXPTOOWS.XLA excel file, and then we have to restore the SharePoint sites collection(s).
Modify EXPTOOWS.XLA
- Open the Excel add-in "EXPTOOWS.XLA" located by default in "c:\Program Files\Microsoft Office\Office12\<LCID>", where <LCID> is your language identifier (for example, 1033 for a standard English installation, 1036 for a French one).
- Press ALT+F11 to open the Visual Basic source code editor
- Comment out the following line : "lVer = Application.SharePointVersion(URL)" by adding a simple quote at the beginning of the line
- Below the commented line, add the following instruction : IVer = 2
- Save your changes, and restart the client machine.
Backup and restore site the sites collection
The Excel install is now fixed, and you will be able to import Excel files in custom SharePoint list on the new SharePoint site collections. But in order to make this solution work on the actual site collection, you will have to backup and restore it by using STSADM command line tool which is provided with SharePoint (more information on STSADM command line tool are available by following this link : http://technet.microsoft.com/en-us/library/cc261956.aspx)
Execute the following commands :
stsadm -o backup -url http://PORTAL-URL -filename c:\Backups\BACKUP-FILE.dat
stsadm -o restore -url http://PORTAL-URL -filename c:\Backups\BACKUP-FILE.dat -overwrite
You can now start again the custom list importation from an Excel file, it should now work properly.