Converting Lotus to Excel


Posted by Jeff Piescic on December 18, 2000 12:48 PM

Dear Mr. Excel,

Could you please point me to a source of info regarding converting Lotus
123 files to Excel 97.

A step by step process would be nice. What are the common probelms. Are
links preserved? etc..

Thanks,

Jeff Piescic.



Posted by Jason on December 21, 2000 12:04 PM

I know absolutely nothing about visual basic, but I had found the following and it worked great. I wish I could remember where it came from.


Sub LotusConverter()

'Set "filenam" to the first matching file in the current folder.
filenam = Dir("*.wk*")

'Loop to open each matching file in the current folder.
Do While Len(filenam) > 0

On Error Resume Next

'Opens the file.
Workbooks.Open Filename:=filenam

'Continues execution if there was no error opening the file.
If Err = 0 Then

'Creates "newname" based on original Lotus file name.
newnam = Left(filenam, InStr(1, filenam, ".") - 1) & ".xls"
'Saves the new file as a Microsoft Excel normal file.
ActiveWorkbook.SaveAs Filename:=newnam, FileFormat:=xlNormal
'Closes the current file.
ActiveWorkbook.Close
Else

'Display message if opening filenam was unsuccessful.
MsgBox "Unable to Open file: " & CurDir() & "\" & filenam
'Resets error checking.
Err = 0

End If

'Gets the next file name
filenam = Dir()
'Repeats the loop for all matching files in the current folder.
Loop

End Sub