Commit ab1ecfa2 authored by Udi Finkelstein's avatar Udi Finkelstein
Browse files

While no work should proceed on this specifc implementation, and on the 3.0...

While no work should proceed on this specifc implementation, and on the 3.0 branch, I still wanted to fix the doc and try tox.

--HG--
branch : 3.0
parent 49a78733de86
Pipeline #29055 passed with stage
in 5 minutes and 43 seconds
......@@ -16,12 +16,12 @@ You can create :class:`InlineFont` objects on their own, and use them later:
The :class:`InlineFont` objects are saimilar in functionality to the :class:`Font` objects, but unfortunately uses slightly different field names:
.. :: doctest
>>> inline_font = InlineFont(rFont='Calibri', # Font name
... sz=22, # in 1/144 in. (1/2 point) units, must be integer
... b=True, # bold (True/False)
... charset=None, # character set (0 to 255), less required with UTF-8
... family=None, # Font family
... b=None, # Bold (True/False)
... b=True, # Bold (True/False)
... i=None, # Italics (True/False)
... strike=None, # strikethrough
... outline=None,
......@@ -29,7 +29,6 @@ The :class:`InlineFont` objects are saimilar in functionality to the :class:`Fon
... condense=None,
... extend=None,
... color=None,
... sz=None,
... u=None,
... vertAlign=None,
... scheme=None,
......@@ -39,6 +38,8 @@ Fortunately, you can simply initialize an :class:`InlineFont` object with an exi
The following are the default values
.. :: doctest
>>> from openpyxl.cell.text import Font
>>> font = Font(name='Calibri',
... size=11,
... bold=False,
......@@ -53,7 +54,6 @@ For example:
.. :: doctest
>>> from openpyxl.cell.text import InlineFont, XmlRichString
>>> red = InlineFont(color='FF000000')
>>> rich_string1 = XmlRichString.write_rich_string('When the color ', red, 'red', ' is used, you can expect ', red, 'danger')
......@@ -66,6 +66,9 @@ There are now 3 different possible value types that can be assigned to cells:
* Rich Strings, represented by XML `Element` objects created by `XmlRichString.write_rich_string`
* Cell objects, in which case their value is copied to the destination cell.
>>> from openpyxl import Workbook
>>> wb = Workbook()
>>> ws = wb.active
>>> ws['A1'] = rich_string1
>>> ws['A2'] = 'Simple string'
>>> ws['A3'] = ws['A1']
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment