
- #HIGHLIGHT EVERY OTHER ROW IN OPENOFFICE CALC HOW TO#
- #HIGHLIGHT EVERY OTHER ROW IN OPENOFFICE CALC MOD#
- #HIGHLIGHT EVERY OTHER ROW IN OPENOFFICE CALC MANUAL#
- #HIGHLIGHT EVERY OTHER ROW IN OPENOFFICE CALC SOFTWARE#
- #HIGHLIGHT EVERY OTHER ROW IN OPENOFFICE CALC CODE#
' now set color to Odd (number) rows (are even indexes)ĪctRange = actSheet.getCellRangeByPosition(0,i,lCols,i)ĪctRange. ' set range to one color (performance issue)ĪctRange = actSheet.getCellRangeByPosition(0,lStartRow,lCols,lRows)ĪtPropertyValue("CellBackColor", lEvenColor) In this way, we can quickly shade every other row in WPS Spreadsheet. Then select the table areas we want to shade. Select this area and double-click the Format Painter. Set the color of part of the table according to our needs.
#HIGHLIGHT EVERY OTHER ROW IN OPENOFFICE CALC HOW TO#
' style heading found: increase start row How to shade every other row in WPS Spreadsheet Take this table as an example. If INSTR(oCell.CellStyle, "Heading") > 0 then ' watch out on first 4 rows if they might be formatted as heading MsgBox(sQuestion ,35, sModulSubName & " - " & sModulVersion)ĪctSheet = & CHR(10) & "No: apply to actual sheet only" & CHR(10) & "Should all sheets be affected?" _ "Applying alternating background colors to used cell range."_ ' more than 1 sheet, ask if macro should work on all sheets & "Macro " & sModulSubName & " will terminate now." _ & CHR(10) & "range in CALC Documents and will only work there."_ & CHR(10) & "background colors to the rows of the used cell"_ & CHR(10) & "This Macro applies alternating, pre-definied" _ "Macro not called from CALC Document." & CHR(10) _
#HIGHLIGHT EVERY OTHER ROW IN OPENOFFICE CALC MANUAL#
Sub colorCalcTableRowsEnglish ' manual extension ' =ĭim sModulName, sModulSubName, sModulVersion
#HIGHLIGHT EVERY OTHER ROW IN OPENOFFICE CALC SOFTWARE#
'this program if not, write to the Free Software Foundation, Inc., 59 Temple The ROW function provides the number, which is divided by 2.
#HIGHLIGHT EVERY OTHER ROW IN OPENOFFICE CALC MOD#
MOD takes a number and a divisor as arguments, and returns the remainder. 'You should have received a copy of the GNU General Public License along with In that case, you can use the 'classic' formula for shading even or odd rows, which depends on the MOD function: MOD(ROW(),2) 0 // returns true for even rows MOD(ROW(),2) 1 // returns true for odd rows. Open the example and go Format > Conditional Formatting > Manage > Edit to see the conditional format(s) defined for the. See the GNU General Public License for more details. 'WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR 'This program is distributed in the hope that it will be useful, but WITHOUT ANY 'Foundation either version 2 of the License, or (at your option) any later 'the terms of the GNU General Public License as published by the Free Software 'This program is free software you can redistribute it and/or modify it under HTH 'Copyright (c) 2004, 2016 Winfried Rohr, re-Solutions Software Test Engineering
#HIGHLIGHT EVERY OTHER ROW IN OPENOFFICE CALC CODE#
I hope the source is well documented to let you find the color definitions, if you like to change them -)Ĭopy the code to a module in your STANDARD library of Basic code, to be available to all CALC documetns.




New columns are inserted to the left of the first highlighted column.Columns and rows can be inserted individually or in groups.
