XL: Macro to Delete Blank Rows and Columns in a Lotus FileLast reviewed: February 3, 1998Article ID: Q147254 |
The information in this article applies to:
SUMMARYIn Microsoft Excel, when a Lotus 1-2-3 WK4 file is opened and then saved into the Microsoft Excel Workbook format, the file size may increase by a large amount. This behavior occurs because formatting is applied to an entire row or column. Microsoft Excel detects and saves the formats in all of the blank cells, whereas Lotus 1-2-3 does not. You can delete these blank rows and columns manually, but that may take time. This article contains a sample Microsoft Visual Basic for Applications macro (Sub procedure) you can use to speed up the process of shrinking the file by getting rid of the blank rows and columns in the file.
MORE INFORMATIONMicrosoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web:
http://www.microsoft.com/support/supportnet/refguide/default.asp Sample Visual Basic Procedure
Sub DelRowCol() On Error GoTo crash For Each Item In ActiveWorkbook.Worksheets x = InputBox("Enter the last column letter of Sheet - " & _ Item.Name) y = InputBox("Enter the last row number of Sheet - " & _ Item.Name) Item.Range(Left(Item.Range(x & ":" & x).Offset(0, 1).Address, _ InStr(Item.Range(x & ":" & x).Offset(0, 1).Address, ":") _ - 1) & ":$iv").Delete Item.Range("$" & y + 1 & ":$16384").Delete Next Item ActiveWorkbook.Save Exit Sub crash: MsgBox "Error in conversion" End SubFor additional information about opening and working with Lotus 1-2-3 WK4 files in Microsoft Excel, please see the following articles in the Microsoft Knowledge Base:
ARTICLE-ID: Q123269 TITLE : XL5: Large File Size After Saving WK4 File as Excel Workbook ARTICLE-ID: Q122583 TITLE : WE1130: Lotus 1-2-3 WK4 File Converter |
Additional query words: 5.00 7.00 8.00 XL98 XL97 XL7 XL5 WK4 WK3 WK1
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |