Revision: 61834
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at January 17, 2013 20:56 by thefamousnomo
Initial Code
Sub Main Dim oSheets : Dim oSheet : Dim oUsedRange : Dim oCursor : Dim lastRow : Dim I As Integer : Dim oCell : Dim lastVal As String oSheets = ThisComponent oSheet = oSheets.Sheets(0) oUsedRange = oSheet.getCellRangeByPosition(0,0,0,0) oCursor = oSheet.createCursorByRange(oUsedRange) oCursor.GotoEndOfUsedArea(false) lastRow = oCursor.RangeAddress.EndRow for I = 0 to lastRow oCell = oSheet.getCellByPosition(0, I) if Left(oCell.String, 1) <> lastVal Then 'MsgBox Left(oCell.String, 1) oCell.Rows.IsStartOfNewPage = True endif lastVal = Left(oCell.String, 1) next I End Sub
Initial URL
Initial Description
page break inserted when first letter of first cell in row changes
Initial Title
insert page breaks in oocalc spreadsheet
Initial Tags
Initial Language
Other