PC Review


Reply
Thread Tools Rate Thread

How can I batch convert 97-2003 .xls files to 2007 .xlsx files

 
 
=?Utf-8?B?RGF2ZSBOdXR0YWxs?=
Guest
Posts: n/a
 
      30th Jul 2007
I have a lot to do, so it would be nice to batch them up!
 
Reply With Quote
 
 
 
 
Bernie Deitrick
Guest
Posts: n/a
 
      30th Jul 2007
Dave,

You could run a macro, below. Change the path to where you have the files stored. With Excel 2007,
you have a few options - I'm showing how to save files that may have macros or other code...

HTH,
Bernie Deitrick
MS Excel MVP

Sub TrandformAllXLSFilesToXLSM()

Dim myPath As String

myPath = "C:\Excel\"
WorkFile = Dir(myPath & "*.xls")

Do While WorkFile <> ""
If Right(WorkFile, 4) <> "xlsm" Then
Workbooks.Open FileName:=myPath & WorkFile
ActiveWorkbook.SaveAs FileName:= _
myPath & WorkFile & "m", FileFormat:= _
xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
ActiveWorkbook.Close
End If
WorkFile = Dir()
Loop
End Sub

"Dave Nuttall" <(E-Mail Removed)> wrote in message
news:3A10C201-9777-413D-A028-(E-Mail Removed)...
>I have a lot to do, so it would be nice to batch them up!



 
Reply With Quote
 
Jim Rech
Guest
Posts: n/a
 
      30th Jul 2007
I would just add that if any of those workbooks had macros the files have to
get the XLSM extension or Excel will refuse to run them.

--
Jim
"Bernie Deitrick" <deitbe @ consumer dot org> wrote in message
news:e$(E-Mail Removed)...
| Dave,
|
| You could run a macro, below. Change the path to where you have the files
stored. With Excel 2007,
| you have a few options - I'm showing how to save files that may have
macros or other code...
|
| HTH,
| Bernie Deitrick
| MS Excel MVP
|
| Sub TrandformAllXLSFilesToXLSM()
|
| Dim myPath As String
|
| myPath = "C:\Excel\"
| WorkFile = Dir(myPath & "*.xls")
|
| Do While WorkFile <> ""
| If Right(WorkFile, 4) <> "xlsm" Then
| Workbooks.Open FileName:=myPath & WorkFile
| ActiveWorkbook.SaveAs FileName:= _
| myPath & WorkFile & "m", FileFormat:= _
| xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
| ActiveWorkbook.Close
| End If
| WorkFile = Dir()
| Loop
| End Sub
|
| "Dave Nuttall" <(E-Mail Removed)> wrote in message
| news:3A10C201-9777-413D-A028-(E-Mail Removed)...
| >I have a lot to do, so it would be nice to batch them up!
|
|


 
Reply With Quote
 
=?Utf-8?B?RGF2ZSBOdXR0YWxs?=
Guest
Posts: n/a
 
      30th Jul 2007

> You could run a macro, below.


Thanks Bernie! In my naivety I had supposed that MS would have supplied a
way to do this (other than one at a time), but had forgotten to tell anyone
about it.
 
Reply With Quote
 
Matt Campbell
Guest
Posts: n/a
 
      3rd Aug 2009
Thanks, Bernie. Would like to point you et al. to this:

http://www.rondebruin.nl/saveas.htm

It mentions the importance of specifying the sub-format with Excel 2007
since it has about 10 million to choose from just to make life interesting.

By the way, does anyone know if there is any kind of share/freeware utility
that will do these conversions faster than some VBA-powered macro? The
reason we want to do it here at our office is because the 2007 formatted docs
are so much smaller than the earlier versions and we are running low on file
server space.

"Bernie Deitrick" wrote:

> Dave,
>
> You could run a macro, below. Change the path to where you have the files stored. With Excel 2007,
> you have a few options - I'm showing how to save files that may have macros or other code...
>
> HTH,
> Bernie Deitrick
> MS Excel MVP
>
> Sub TrandformAllXLSFilesToXLSM()
>
> Dim myPath As String
>
> myPath = "C:\Excel\"
> WorkFile = Dir(myPath & "*.xls")
>
> Do While WorkFile <> ""
> If Right(WorkFile, 4) <> "xlsm" Then
> Workbooks.Open FileName:=myPath & WorkFile
> ActiveWorkbook.SaveAs FileName:= _
> myPath & WorkFile & "m", FileFormat:= _
> xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
> ActiveWorkbook.Close
> End If
> WorkFile = Dir()
> Loop
> End Sub
>
> "Dave Nuttall" <(E-Mail Removed)> wrote in message
> news:3A10C201-9777-413D-A028-(E-Mail Removed)...
> >I have a lot to do, so it would be nice to batch them up!

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I convert .xlsx to .xls Excel files? William Microsoft Excel Misc 0 25th Nov 2009 11:37 PM
How can I convert a batch of .wpd files to Word 2007 files? SPW Microsoft Word New Users 3 15th Jul 2008 05:10 AM
Batch Convert 2007 Excel files to 2003 format Pman Microsoft Excel Misc 0 29th May 2008 05:58 PM
Re: converter tool to convert XL 2007 files to XL 2003 files Bob Phillips Microsoft Excel Misc 3 15th Dec 2006 12:45 AM
HOW DO I CONVERT XLSX FILES BACK TO EXCEL 2003? =?Utf-8?B?dmVp?= Microsoft Excel Misc 5 10th Jul 2006 09:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:01 PM.