Difference between revisions of "Talk:Spreadsheet Tricks"

From TeleCafeWiki
Jump to navigation Jump to search
(Start talk page -- add table template for spreadsheet formula examples.)
 
(→‎Table Formats: |+ Table Caption)
 
Line 1: Line 1:
 +
== Wiki table markup summary ==
 +
{| class="wikitable" style="width:60%"
 +
| style="padding: 10px;"| <big><nowiki>{|</nowiki></big>
 +
| style="padding: 5px;"| '''table start''', ''required''
 +
|-
 +
| style="padding: 10px;"| <big><nowiki>|+</nowiki></big>
 +
| style="padding: 5px;" | table '''caption''', ''optional;'' only between '''table start''' and '''table row'''
 +
|-
 +
| style="padding: 10px;"| <big><nowiki>|-</nowiki></big>
 +
| style="padding: 5px;" | '''table row''', ''optional on first row''—wiki engine assumes the first row
 +
|-
 +
| style="padding: 10px;"| <big><nowiki>!</nowiki></big>
 +
| style="padding: 5px;" | '''table header''' cell, ''optional.'' Consecutive '''table header''' cells may be added on same line separated by double marks (<code>!!</code>) or start on new lines, each with its own single mark (<code>!</code>).
 +
|-
 +
| style="padding: 10px;"| <big><nowiki>|</nowiki></big>
 +
| style="padding: 5px;" | '''table data''' cell, ''optional''. Consecutive '''table data''' cells may be added on same line separated by double marks (<code><nowiki>||</nowiki></code>) or start on new lines, each with its own single mark (<code><nowiki>|</nowiki></code>).
 +
|-
 +
| style="padding: 10px;"| <big><nowiki>|}</nowiki></big>
 +
| style="padding: 5px;" | '''table end''', ''required''
 +
|}
 +
*The above marks must '''start on a new line''' except the double <code>||</code> and <code>!!</code> for optionally adding consecutive cells to a line. However, blank spaces at the beginning of a line are ignored.
 +
*'''XHTML attributes.''' Each mark, except table end, optionally accepts one or more XHTML attributes. Attributes must be on the same line as the mark. Separate attributes from each other with a single space.
 +
**Cells and caption (<code>|</code> or <code>||</code>, <code>!</code> or <code>!!</code>, and <code>|+</code>) hold content. So separate any attributes from content with a single pipe (<code>|</code>). Cell content may follow on same line or on following lines.
 +
**Table and row marks (<code>{|</code> and <code>|-</code>) do not directly hold content. Do ''not'' add pipe (<code>|</code>) after their optional attributes. If you erroneously add a pipe after attributes for the table mark or row mark the parser will delete it ''and'' your final attribute if it was touching the erroneous pipe!
 +
*'''Content''' may (a) follow its cell mark on the same line after any optional XHTML attributes or (b) on lines below the cell mark. Content that uses wiki markup that itself needs to start on a new line, such as lists, headings, or nested tables, must be on its own new line.
 +
**'''Pipe character as content.''' To insert a pipe (<code>|</code>) character into a table, use the &lt;nowiki&gt;<code>|</code>&lt;/nowiki&gt; escaping markup.
 +
 
== Table Formats ==
 
== Table Formats ==
 
{| class="wikitable" style="color: black; background-color: #FFFAFA;"
 
{| class="wikitable" style="color: black; background-color: #FFFAFA;"
 +
|+ Table Caption (Top)
 
! scope="col" |  
 
! scope="col" |  
 
! scope="col" | A
 
! scope="col" | A
Line 41: Line 69:
 
'''Please Note:''' The formula bar indicates that this is an array formula by enclosing it in curly braces <tt>{&nbsp;}</tt>. Do not type these yourself. They disappear whenever you edit the formula, making it necessary to press <tt>CTRL+Shift+Enter</tt>&nbsp;(PC) or <tt>CMND+Shift+Enter</tt>&nbsp;(Mac) whenever you edit the formula. The curly braces <tt>{&nbsp;}</tt> in the examples shown above are displayed only to show what the formula looks like as it appears in the formula bar.<br />
 
'''Please Note:''' The formula bar indicates that this is an array formula by enclosing it in curly braces <tt>{&nbsp;}</tt>. Do not type these yourself. They disappear whenever you edit the formula, making it necessary to press <tt>CTRL+Shift+Enter</tt>&nbsp;(PC) or <tt>CMND+Shift+Enter</tt>&nbsp;(Mac) whenever you edit the formula. The curly braces <tt>{&nbsp;}</tt> in the examples shown above are displayed only to show what the formula looks like as it appears in the formula bar.<br />
 
'''Source:''' [http://www.mrexcel.com/forum/excel-questions/505622-text-numbers-same-cell-sum-numbers.html text and,numbers in same cell, sum of numbers ?]
 
'''Source:''' [http://www.mrexcel.com/forum/excel-questions/505622-text-numbers-same-cell-sum-numbers.html text and,numbers in same cell, sum of numbers ?]
 +
|}
 +
 +
=== Table Caption Examples ===
 +
{| style="width:100%"
 +
! style="width: 50%;"|You type
 +
! style="width: 50%;"|You get
 +
|-
 +
| style="padding: 25px;"|
 +
<pre>
 +
{| class="wikitable"
 +
|+ style="color:#e76700;"|''Top Caption''
 +
|-
 +
|Orange
 +
|Apple
 +
|-
 +
|Bread
 +
|Pie
 +
|-
 +
|Butter
 +
|Ice cream
 +
|}
 +
</pre>
 +
| style="padding: 25px;"|
 +
{| class="wikitable"
 +
|+ style="color:#e76700;"|''Top Caption''
 +
|-
 +
|Orange
 +
|Apple
 +
|-
 +
|Bread
 +
|Pie
 +
|-
 +
|Butter
 +
|Ice cream
 +
|}
 +
|}
 +
 +
{| style="width:100%"
 +
! style="width: 50%;"|You type
 +
! style="width: 50%;"|You get
 +
|-
 +
| style="padding: 25px;"|
 +
<pre>
 +
{| class="wikitable"
 +
|+ style="caption-side:bottom; color:#e76700;"|''Bottom Caption''
 +
|-
 +
|Orange
 +
|Apple
 +
|-
 +
|Bread
 +
|Pie
 +
|-
 +
|Butter
 +
|Ice cream
 +
|}
 +
</pre>
 +
| style="padding: 25px;"|
 +
{| class="wikitable"
 +
|+ style="caption-side:bottom; color:#e76700;"|''Bottom Caption''
 +
|-
 +
|Orange
 +
|Apple
 +
|-
 +
|Bread
 +
|Pie
 +
|-
 +
|Butter
 +
|Ice cream
 +
|}
 +
|}
 +
 +
{| style="width:100%"
 +
! style="width: 50%;"|You type
 +
! style="width: 50%;"|You get
 +
|-
 +
| style="padding: 25px;"|
 +
<pre>
 +
{| class="wikitable"
 +
|+ style="caption-side:left; color:#e76700;"|''Left Caption''
 +
|-
 +
|Orange
 +
|Apple
 +
|-
 +
|Bread
 +
|Pie
 +
|-
 +
|Butter
 +
|Ice cream
 +
|}
 +
</pre>
 +
| style="padding: 25px;"|
 +
{| class="wikitable"
 +
|+ style="caption-side:left; color:#e76700;"|''Left Caption''
 +
|-
 +
|Orange
 +
|Apple
 +
|-
 +
|Bread
 +
|Pie
 +
|-
 +
|Butter
 +
|Ice cream
 +
|}
 +
|}
 +
 +
{| style="width:100%"
 +
! style="width: 50%;"|You type
 +
! style="width: 50%;"|You get
 +
|-
 +
| style="padding: 25px;"|
 +
<pre>
 +
{| class="wikitable"
 +
|+ style="caption-side:right; color:#e76700;"|''Right Caption''
 +
|-
 +
|Orange
 +
|Apple
 +
|-
 +
|Bread
 +
|Pie
 +
|-
 +
|Butter
 +
|Ice cream
 +
|}
 +
</pre>
 +
| style="padding: 25px;"|
 +
{| class="wikitable"
 +
|+ style="caption-side:right; color:#e76700;"|''Right Caption''
 +
|-
 +
|Orange
 +
|Apple
 +
|-
 +
|Bread
 +
|Pie
 +
|-
 +
|Butter
 +
|Ice cream
 +
|}
 
|}
 
|}

Latest revision as of 16:50, 13 December 2015

Wiki table markup summary

{| table start, required
|+ table caption, optional; only between table start and table row
|- table row, optional on first row—wiki engine assumes the first row
! table header cell, optional. Consecutive table header cells may be added on same line separated by double marks (!!) or start on new lines, each with its own single mark (!).
| table data cell, optional. Consecutive table data cells may be added on same line separated by double marks (||) or start on new lines, each with its own single mark (|).
|} table end, required
  • The above marks must start on a new line except the double || and !! for optionally adding consecutive cells to a line. However, blank spaces at the beginning of a line are ignored.
  • XHTML attributes. Each mark, except table end, optionally accepts one or more XHTML attributes. Attributes must be on the same line as the mark. Separate attributes from each other with a single space.
    • Cells and caption (| or ||, ! or !!, and |+) hold content. So separate any attributes from content with a single pipe (|). Cell content may follow on same line or on following lines.
    • Table and row marks ({| and |-) do not directly hold content. Do not add pipe (|) after their optional attributes. If you erroneously add a pipe after attributes for the table mark or row mark the parser will delete it and your final attribute if it was touching the erroneous pipe!
  • Content may (a) follow its cell mark on the same line after any optional XHTML attributes or (b) on lines below the cell mark. Content that uses wiki markup that itself needs to start on a new line, such as lists, headings, or nested tables, must be on its own new line.
    • Pipe character as content. To insert a pipe (|) character into a table, use the <nowiki>|</nowiki> escaping markup.

Table Formats

Table Caption (Top)
A B C D E
1 Header 1 Header 2 Header 3 Header 4 Header 5
2 1 77 4 7 10
3 2 12 5 8 11
4 3 24 6 9 12
5 Formula Example:

Array Formula: The formulas shown above are array formulas. After typing an array formula into the formula bar, finish by pressing CTRL+Shift+Enter (PC) or CMND+Shift+Enter (Mac).
Please Note: The formula bar indicates that this is an array formula by enclosing it in curly braces { }. Do not type these yourself. They disappear whenever you edit the formula, making it necessary to press CTRL+Shift+Enter (PC) or CMND+Shift+Enter (Mac) whenever you edit the formula. The curly braces { } in the examples shown above are displayed only to show what the formula looks like as it appears in the formula bar.
Source: text and,numbers in same cell, sum of numbers ?

Table Caption Examples

You type You get
{| class="wikitable"
|+ style="color:#e76700;"|''Top Caption''
|-
|Orange
|Apple
|-
|Bread
|Pie
|-
|Butter
|Ice cream 
|}
Top Caption
Orange Apple
Bread Pie
Butter Ice cream
You type You get
{| class="wikitable"
|+ style="caption-side:bottom; color:#e76700;"|''Bottom Caption''
|-
|Orange
|Apple
|-
|Bread
|Pie
|-
|Butter
|Ice cream 
|}
Bottom Caption
Orange Apple
Bread Pie
Butter Ice cream
You type You get
{| class="wikitable"
|+ style="caption-side:left; color:#e76700;"|''Left Caption''
|-
|Orange
|Apple
|-
|Bread
|Pie
|-
|Butter
|Ice cream 
|}
Left Caption
Orange Apple
Bread Pie
Butter Ice cream
You type You get
{| class="wikitable"
|+ style="caption-side:right; color:#e76700;"|''Right Caption''
|-
|Orange
|Apple
|-
|Bread
|Pie
|-
|Butter
|Ice cream 
|}
Right Caption
Orange Apple
Bread Pie
Butter Ice cream