PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Returns or modifies the style of selected cells in a Spreadsheet control found in a window.
Example
// CLICK on [BOLD]
SpreadsheetStyleSelection(PSHEET_Spreadsheet, psheetBold, True)


// Displays the B1 cell in bold
SpreadsheetSelectPlus(PSHEET_Spreadsheet, "B1")
SpreadsheetStyleSelection(PSHEET_Spreadsheet, psheetBold, True)
sRes is boolean = SpreadsheetStyleSelection(PSHEET_Spreadsheet, psheetBold)
Syntax

Finding out the selection style Hide the details

<Result> = SpreadsheetStyleSelection(<Spreadsheet Control> , <Attribute>)
<Result>: Type of expected result
Result corresponding to the requested attribute.
<Spreadsheet Control>: Control name
Name of Spreadsheet control to use.
<Attribute>: Integer constant
Attribute to find out:
psheetAlignmentHHorizontal alignment.
In this case, <Result> can correspond to:
  • haCenter: Centered alignment.
  • haRight: Right alignment.
  • haLeft: Alignment to left.
psheetAlignmentVVertical alignment.
In this case, <Result> can correspond to:
  • vaBottom: Alignment at bottom.
  • vaTop: Alignment at top.
  • vaMiddle: Alignment in the middle.
Versions 23 and later
psheetFontAngle
New in version 23
psheetFontAngle
psheetFontAngle
Rotation angle of text.
In this case, <Result> can correspond to an integer included between -180 and +180.
psheetStrikeOutStruck-out character.
In this case, <Result> can correspond to:
  • True to strike out,
  • False not to strike out.
psheetBackgroundColorBackground color of text.
In this case, <Result> corresponds to:
psheetTextColorText color.
In this case, <Result> corresponds to:
psheetBoldBold character.
In this case, <Result> can correspond to:
  • True to display in bold,
  • False not to display in bold.
psheetItalicItalic character.
In this case, <Result> can correspond to:
  • True to display in italic,
  • False not to display in italic.
psheetFontNameName of font used.
In this case, <Result> can correspond to a character string containing the font name.
Versions 23 and later
psheetAutomaticLineWrap
New in version 23
psheetAutomaticLineWrap
psheetAutomaticLineWrap
Management of automatic line wrap.
In this case, <Result> can correspond to:
  • True to use the automatic line wrap,
  • False not to use the automatic line wrap.
psheetUnderlinedUnderlined character.
In this case, <Result> can correspond to:
  • True to underline,
  • False not to underline.
psheetFontSizeFont size.
In this case, <Result> corresponds to the font size (integer).

Modifying the selection style Hide the details

SpreadsheetStyleSelection(<Spreadsheet Control> , <Attribute> , <Value>)
<Spreadsheet Control>: Control name
Name of Spreadsheet control to use.
<Attribute>: Integer constant
Attribute to modify. This element can correspond to:
psheetAlignmentHHorizontal alignment.
In this case, <Value> can correspond to:
  • haCenter: Centered alignment.
  • haRight: Right alignment.
  • haLeft: Alignment to left.
psheetAlignmentVVertical alignment.
In this case, <Value> can correspond to:
  • vaBottom: Alignment at bottom.
  • vaTop: Alignment at top.
  • vaMiddle: Alignment in the middle.
Versions 23 and later
psheetFontAngle
New in version 23
psheetFontAngle
psheetFontAngle
Rotation angle of text.
In this case, <Value> can correspond to an integer included between -180 and +180.
psheetStrikeOutStruck-out character.
In this case, <Value> can correspond to:
  • True to strike out,
  • False not to strike out.
psheetBackgroundColorBackground color of text.
In this case, <Value> corresponds to:
psheetTextColorText color.
In this case, <Value> corresponds to:
psheetBoldBold character.
In this case, <Value> can correspond to:
  • True to display in bold,
  • False not to display in bold.
psheetItalicItalic character.
In this case, <Value> can correspond to:
  • True to display in italic,
  • False not to display in italic.
psheetFontNameName of font used.
In this case, <Value> can correspond to a character string containing the font name.
Versions 23 and later
psheetAutomaticLineWrap
New in version 23
psheetAutomaticLineWrap
psheetAutomaticLineWrap
Management of automatic line wrap.
In this case, <Value> can correspond to:
  • True to use the automatic line wrap,
  • False not to use the automatic line wrap.
psheetUnderlinedUnderlined character.
In this case, <Value> can correspond to:
  • True to underline,
  • False not to underline.
psheetFontSizeFont size.
In this case, <Value> corresponds to the font size (integer).
<Value>: Variant
Value that will be given to the attribute.
Remarks
  • The modification operation is added into the list of operations to cancel: the user can cancel this operation via the popup menu or by pressing [CTRL] + Z.
  • This function can only be used on a Spreadsheet control found in a window.
Related Examples:
The Spreadsheet control Unit examples (WINDEV): The Spreadsheet control
[ + ] Using the Spreadsheet control.
This example explains how to:
- load an xlsx file in a spreadsheet control,
- save the spreadsheet in a file,
- fill the control with data coming from the database,
- insert rows, columns,
- access the cells and handle them (modify their value, their style, ...),
- enter formulas,
- ...
Components
WINDEVReports and Queries wd230obj.dll
Minimum required version
  • Version 20
This page is also available for…
Comments
Click [Add] to post a comment