Translation

calc_borders.xhp bas_id131630537785605 help.text
English Xzm6Q
Context English English (United Kingdom) Actions
basic_2_python.xhp
N0556
help.text
<emph>json</emph> JSON encoder and decoder <emph>json</emph> JSON encoder and decoder
basic_2_python.xhp
N0557
help.text
<emph>math</emph> Mathematical functions <emph>math</emph> Mathematical functions
basic_2_python.xhp
N0558
help.text
<emph>re</emph> Regular expression operations <emph>re</emph> Regular expression operations
basic_2_python.xhp
N0559
help.text
<emph>socket</emph> Low-level networking interface <emph>socket</emph> Low-level networking interface
basic_2_python.xhp
N0560
help.text
<emph>sys</emph> System-specific parameters and functions <emph>sys</emph> System-specific parameters and functions
basic_2_python.xhp
N0561
help.text
<emph>unittest</emph> and <emph>trace</emph> Unit testing framework and Track Python execution <emph>unittest</emph> and <emph>trace</emph> Unit testing framework and Track Python execution
basic_2_python.xhp
N0562
help.text
<emph>xml.etree.ElementTree</emph> ElementTree XML API <emph>xml.etree.ElementTree</emph> ElementTree XML API
basic_examples.xhp
tit
help.text
Basic Programming Examples Basic Programming Examples
basic_examples.xhp
bm_id171559140731329
help.text
<bookmark_value>Basic;programming examples</bookmark_value> <bookmark_value>Basic;programming examples</bookmark_value>
basic_examples.xhp
hd_id471559139063621
help.text
<variable id="basicexamplestit"><link href="text/sbasic/guide/basic_examples.xhp" name="Basic Programming Examples">Basic Programming Examples</link></variable> <variable id="basicexamplestit"><link href="text/sbasic/guide/basic_examples.xhp" name="Basic Programming Examples">Basic Programming Examples</link></variable>
calc_borders.xhp
tit
help.text
Formatting Borders in Calc with Macros Formatting Borders in Calc with Macros
calc_borders.xhp
hd_id461623364876507
help.text
<variable id="title"><link href="text/sbasic/guide/calc_borders.xhp" name="Calc_Borders_h1">Formatting Borders in Calc with Macros</link></variable> <variable id="title"><link href="text/sbasic/guide/calc_borders.xhp" name="Calc_Borders_h1">Formatting Borders in Calc with Macros</link></variable>
calc_borders.xhp
par_id461630536347127
help.text
By using Basic or Python programming languages it is possible to write macros that apply formats to ranges of cells in Calc. By using Basic or Python programming languages it is possible to write macros that apply formats to ranges of cells in Calc.
calc_borders.xhp
hd_id81630536486560
help.text
Formatting Borders in Ranges of Cells Formatting Borders in Ranges of Cells
calc_borders.xhp
par_id871630536518700
help.text
The code snippet below creates a <literal>Sub</literal> called <literal>FormatCellBorder</literal> that applies new border formats to a given range address in the current Calc sheet. The code snippet below creates a <literal>Sub</literal> called <literal>FormatCellBorder</literal> that applies new border formats to a given range address in the current Calc sheet.
calc_borders.xhp
bas_id131630537785605
help.text
' Creates the UNO struct that will store the new line format
calc_borders.xhp
bas_id971630537786724
help.text
' Gets the target cell
calc_borders.xhp
bas_id791630537787373
help.text
' Applies the new format to all borders
calc_borders.xhp
par_id141630537941393
help.text
The <literal>Sub</literal> described above takes in four arguments:
calc_borders.xhp
par_id841630538209958
help.text
<emph>cellAddress</emph> is a string denoting the range to be formatted in the format "A1".
calc_borders.xhp
par_id821630538210271
help.text
<emph>newStyle</emph> is an integer value that corresponds to the border line style (see <link href="text/sbasic/guide/calc_borders.xhp#LineStyles_h2" name="LineStyles_link">Line Styles</link> below).
calc_borders.xhp
par_id191630538210607
help.text
<emph>newWidth</emph> is an integer value that defines the line width.
calc_borders.xhp
par_id71630538211142
help.text
<emph>newColor</emph> is an integer value corresponding to a color defined using the <link href="text/sbasic/shared/03010305.xhp" name="RGB_link">RGB</link> function. <emph>newColour</emph> is an integer value corresponding to a colour defined using the <link href="text/sbasic/shared/03010305.xhp" name="RGB_link">RGB</link> function.
calc_borders.xhp
par_id201630538522838
help.text
To call <literal>FormatCellBorder</literal> create a new macro and pass the desired arguments, as shown below:
calc_borders.xhp
bas_id651630603779228
help.text
' Gives access to the line style constants
calc_borders.xhp
bas_id321630538931144
help.text
' Formats "B5" with solid blue borders
calc_borders.xhp
bas_id91630538931686
help.text
' Formats all borders in the range "D2:F6" with red dotted borders
calc_borders.xhp
par_id31630540159114
help.text
It is possible to implement the same functionality in Python:
calc_borders.xhp
pyc_id411630540777672
help.text
# Defines the new line format
calc_borders.xhp
pyc_id361630540778786
help.text
# Scriptforge service to access cell ranges
calc_borders.xhp
par_id931630541661889
help.text
The code snippet below implements a macro named <literal>myMacro</literal> that calls <literal>formatCellBorder</literal>:

Loading…

No matching activity found.
Browse all component changes

Glossary

English English (United Kingdom)
No related strings found in the glossary.

String information

Context
calc_borders.xhp
bas_id131630537785605
help.text
Source string description
Xzm6Q
Source string location
calc_borders.xhp
String age
9 months ago
Source string age
9 months ago
Translation file
en-GB/helpcontent2/source/text/sbasic/guide.po, string 80