Warning, /office/calligra/doc/sheets/basics.docbook is written in an unsupported language. File is not indexed.
0001 <chapter id="basics"> 0002 <chapterinfo> 0003 <authorgroup> 0004 <author> 0005 <firstname>Pamela</firstname> 0006 <surname>Robert</surname> 0007 <affiliation> 0008 <address><email>pamroberts@blueyonder.co.uk</email></address> 0009 </affiliation> 0010 </author> 0011 <!-- TRANS:ROLES_OF_TRANSLATORS --> 0012 </authorgroup> 0013 </chapterinfo> 0014 <title>&sheets; Basics</title> 0015 0016 <note><para>Like the rest of &kde;, &sheets; is highly configurable, which can 0017 cause problems for readers trying to compare the text in a document such as 0018 this with what they see on the version of &sheets; running on their desktop. 0019 To cut down on some of the possibilities for confusion, it is suggested that 0020 when you first start to use &sheets; you set the default options in all pages 0021 of the &sheets; configuration dialog (obtained by selecting 0022 <menuchoice><guimenu>Settings</guimenu><guimenuitem>Configure 0023 Sheets...</guimenuitem></menuchoice>). 0024 </para></note> 0025 0026 <sect1 id="starting"> 0027 <title>Spreadsheets for Beginners</title> 0028 0029 <para>This section attempts to explain by example what a spreadsheet program 0030 such as &sheets; actually does, and why it is such a useful tool in any 0031 situation where you have to deal with numbers. If you have already used a 0032 spreadsheet program you may wish to skip to the next section.</para> 0033 0034 <para>The first thing to do is to start up &sheets;. You can do this by 0035 <mousebutton>left</mousebutton> clicking on a &sheets; icon if there is one 0036 on your desktop or panel, or you can select 0037 <menuchoice><guimenu>Office</guimenu><guimenuitem>&sheets;</guimenuitem> 0038 </menuchoice> 0039 from the &kmenu;.</para> 0040 0041 <para> 0042 <mediaobject> 0043 <imageobject> 0044 <imagedata fileref="newdocument.png" format="PNG"/> 0045 </imageobject> 0046 <textobject> 0047 <phrase>&sheets; at first run</phrase> 0048 </textobject> 0049 </mediaobject> 0050 When it has started you will be given the choice of opening a recent 0051 document, creating a new document from a template (with templates categories) or 0052 opening an existing document . Select the <guilabel>General</guilabel> category 0053 on the left and choose the <guilabel>Blank Worksheet</guilabel> template. Then 0054 click the <guibutton>Use This Template</guibutton> button.</para> 0055 0056 <para>Looking at &sheets; once it has started up, you will see a sheet of 0057 empty rectangular cells arranged in numbered rows and lettered columns. This 0058 is where you enter data or formula, text or charts. 0059 <mediaobject> 0060 <imageobject> 0061 <imagedata fileref="starting1.png" format="PNG"/> 0062 </imageobject> 0063 <textobject> 0064 <phrase>Screenshot starting1</phrase> 0065 </textobject> 0066 </mediaobject> 0067 </para> 0068 <para>Now, enter the text and values shown in the first 5 rows of the above 0069 screenshot into the same cells of your spreadsheet. Ignore what is in row 7 0070 for the moment. To enter anything into a cell first select the cell by 0071 <mousebutton>left</mousebutton> clicking inside it, then type whatever you 0072 want, then press &Enter; or use the arrow keys to move the 0073 selection point to another cell. 0074 </para> 0075 <para>What we have entered so far could be a simple budget for the next two 0076 months, listing how much we think we will be spending for Food, Shelter, 0077 Clothing and any Other expenditure. Now select cell B7 (column B, row 7), 0078 type in <userinput>=B2+B3+B4+B5</userinput> and press &Enter;. 0079 Because it begins with a <keycap>=</keycap> symbol &sheets; sees this as a 0080 formula, something it has to calculate, in this case by adding together the 0081 values in the 4 cells B2 to B5, and what is shown in the cell B7 is the result 0082 of that calculation.</para> 0083 <para>You could enter a similar formula into cell C7, except that in this case 0084 it would have to be <userinput>=C2+C3+C4+C5</userinput>, but there is an 0085 easier way which is to Copy cell B7 and Paste it into C7. &sheets; will 0086 automatically adjust the cell references from B.. to C.. when the Paste is 0087 done.</para> 0088 <para>At this point you may think that &sheets; is doing no more than you 0089 could manage with pencil, paper and a calculator, and you could be right, but 0090 remember that this is a very small example of a spreadsheet, doing simple 0091 calculations on only a few numbers. For any reasonably amount of values or data 0092 using a spreadsheet to do the calculations is much quicker and more accurate 0093 than doing them manually.</para> 0094 <para>Also, a spreadsheet lets you play the <quote>What if?</quote> game. 0095 Because each formula is automatically recalculated whenever any of the values 0096 it refers to are changed, you can quickly see what happens if you alter any of 0097 them. Using our example you can see the effect of reducing the amount spent on 0098 food in December by just entering a new value into cell C2. If you had a 0099 spreadsheet that modelled the greenhouse effect accurately you could perhaps 0100 see the effect of a 50 percent reduction in the amount of methane released 0101 into the atmosphere.</para> 0102 </sect1> 0103 0104 <sect1 id="selecting"> 0105 <title>Selecting Cells</title> 0106 <para>You can select a single cell or a rectangular area of cells in the 0107 spreadsheet. The selected cell(s) are displayed with a thick black border. 0108 </para> 0109 <itemizedlist> 0110 <title>You can select a single cell in one of the following ways</title> 0111 <listitem><para><mousebutton>left</mousebutton> click on it</para></listitem> 0112 <listitem><para>enter the cell reference (for example <userinput>B5</userinput>) 0113 into the cell reference box at the left end of the <guilabel>Cell Editor</guilabel> 0114 tool options and press &Enter;</para></listitem> 0115 <listitem><para>use the <menuchoice><guimenu>Go</guimenu><guimenuitem>Goto 0116 Cell...</guimenuitem></menuchoice> menu option</para></listitem> 0117 </itemizedlist> 0118 0119 <para>You can also steer your way around with the <keysym>arrow</keysym> keys. 0120 Pressing the &Enter; key will move the current selection one 0121 position up, down, left or right depending on the setting in the 0122 <guilabel>Interface</guilabel> page of &sheets;'s <link linkend="configinterface">configuration 0123 dialog box</link>.</para> <para>If you hold the <keycombo 0124 action="simul">&Shift;</keycombo> key down while using the 0125 <keysym>arrow</keysym> keys the selection will move to the start or end of the 0126 block of occupied cells.</para> 0127 <para>To select an area of contiguous cells drag the mouse cursor across the 0128 desired area with the <mousebutton>left</mousebutton> button held down, or enter 0129 the references of the top left and bottom right cells separated by a colon into 0130 the <guilabel>Cell Editor</guilabel> cell reference box (for example 0131 <userinput>B7:C14</userinput>) and press &Enter;, or enter these cell references 0132 in a similar format into the dialog box brought up by <menuchoice><guimenu> 0133 Go</guimenu><guimenuitem>Goto Cell...</guimenuitem></menuchoice>.</para> 0134 <para>You can also select an area of cells by selecting the cell in one corner 0135 of the wanted area then holding the <keycombo 0136 action="simul">&Shift; </keycombo> key down while using the 0137 <mousebutton>left</mousebutton> mouse button to select the cell in the opposite 0138 corner.</para> 0139 0140 <para>To select non-contiguous cells, click on the first cell you want to select 0141 then hold the <keycombo action="simul">&Ctrl;</keycombo> key and select the other 0142 cells.</para> 0143 0144 <para>To select a complete row or column of cells <mousebutton>left 0145 </mousebutton> click on the row number at the left of the worksheet or on the 0146 column letters at the top. To select adjacent rows or columns drag the mouse 0147 pointer over the appropriate row numbers or column letters with the 0148 <mousebutton>left</mousebutton> button held down.</para> 0149 <para>To select non-contiguous rows or columns of cells, click on the first row number 0150 or column letter then hold the <keycombo action="simul">&Ctrl;</keycombo> key and select 0151 the other rows or columns of cells.</para> 0152 0153 </sect1> 0154 0155 <sect1 id="entering"> 0156 <title>Entering Data</title> 0157 <para>Entering data into a cell can be as simple as selecting the cell, typing 0158 your data, then pressing &Enter; or moving the selection to 0159 another cell with one of the <keysym>arrow</keysym> keys. Depending on how you 0160 enter the data, &sheets; will interpret it as a number, date, time or text:</para> 0161 <itemizedlist> 0162 <listitem><para> 0163 Numbers are entered in the obvious way; <userinput>123</userinput>, <userinput> 0164 -123</userinput>, <userinput>456.7</userinput> or in scientific notation 0165 <userinput>-1.2E-5</userinput>. 0166 </para></listitem> 0167 <listitem><para> 0168 Dates should be entered in your <quote>System</quote> format, as defined in 0169 the &systemsettings; in <menuchoice><guimenu>Locale</guimenu> <guisubmenu> 0170 Country/Region & Language</guisubmenu><guimenuitem>Date & Time</guimenuitem> 0171 </menuchoice> tab. If, for example, you are using the DD/MM/YYYY form 0172 you should enter <userinput>30/03/2012</userinput> for 30th March 2012. 0173 Leading zeroes can be omitted from the day and month fields and only the last 0174 one or two digits of the year need to be entered if the date is in the current 0175 century, for example <userinput>9/1/9</userinput> for 9th January 2009. 0176 </para></listitem> 0177 <listitem><para> 0178 Times should also be entered using the <quote>System</quote> format. For 0179 example if you are using a 12 hour clock then enter times in HH:MIN am|pm or 0180 HH:MIN:SS am|pm format such as <userinput>9:42 am</userinput> or <userinput> 0181 10:30:52 pm</userinput>. 0182 </para></listitem> 0183 <listitem><para> 0184 &sheets; defines any input data as <quote>text</quote> if it cannot 0185 recognize the data as being a number, date or time. 0186 </para></listitem> 0187 </itemizedlist> 0188 <note><para>By default, &sheets; right justifies numbers, dates and times 0189 within a cell and left justifies anything else. This can be a useful guide 0190 to whether you have entered a date or time in the correct format. But 0191 remember that how items are displayed can be changed by altering 0192 the <link linkend="formatdata">cell format</link>.</para></note> 0193 0194 <para>The main text entry box in the <guilabel>Cell Editor</guilabel> 0195 tool options provides an easy way of 0196 editing the contents of a selected cell. Press &Enter; or 0197 <mousebutton>left</mousebutton> click on the green tick mark when you are 0198 happy with what you have entered, or click on the red cross to cancel your 0199 edits.</para> 0200 0201 <sect2 id="genericformat"> 0202 <title>Generic Cell Format</title> 0203 <para> 0204 &sheets; uses the <quote>Generic</quote> cell format as default. As long 0205 as this format is used, &sheets; autodetects the actual data type depending 0206 on the current cell data. For example if you enter some text into a cell and 0207 later enter a number into the same cell, &sheets; automatically interprets 0208 the new data as a number. If you want to define the type of data yourself, you 0209 can explicitly set it in the <link linkend="formatdata">cell format</link>. 0210 You can change the format back to <quote>Generic</quote> at any time. 0211 </para> 0212 </sect2> 0213 0214 </sect1> 0215 0216 <sect1 id="copypaste"> 0217 <title>Copy, Cut and Paste</title> 0218 0219 <para>At first glance, &sheets;'s <guimenuitem>Cut</guimenuitem>, 0220 <guimenuitem>Copy</guimenuitem> and <guimenuitem>Paste</guimenuitem> appear 0221 to be similar to these functions in other &kde; applications. Having selected 0222 a cell or cells, you can choose <guimenuitem>Copy</guimenuitem> or 0223 <guimenuitem>Cut</guimenuitem> from the <guimenu>Edit</guimenu> menu or from 0224 the drop down menu you get by holding the <mousebutton>right</mousebutton> 0225 mouse button down on a selected cell. You can also use the shortcuts 0226 <keycombo action="simul">&Ctrl;<keycap>C</keycap> 0227 </keycombo> or <keycombo action="simul">&Ctrl;<keycap>X</keycap> 0228 </keycombo>, then move the selection to the target cell and choose 0229 <guimenuitem>Paste</guimenuitem> or press <keycombo action="simul"> 0230 &Ctrl;<keycap>V</keycap></keycombo>. However there are some 0231 subtleties associated with these functions in &sheets; and these are discussed 0232 below.</para> 0233 0234 <para>If a cell contains a formula then the formula itself is copied rather 0235 than the displayed result, and if the formula contains a reference to another 0236 cell, then that reference is changed by the <guimenuitem>Cut</guimenuitem> 0237 or <guimenuitem>Copy</guimenuitem> and <guimenuitem>Paste</guimenuitem> 0238 operation to point to the cell that is in the same relative position as in 0239 the original cell. For example if cell A2 contains the formula <userinput> 0240 =B3</userinput> and is copied to C4, cell C4 will contain <userinput>=D5 0241 </userinput>.</para> 0242 <para>This may seem to be a rather strange way of doing a copy, but 0243 99 percent of the time it is exactly what is wanted (if it is not then see the 0244 section about <link linkend="absolute">absolute cell references</link>). 0245 For example in the simple shopping list shown below, cell D2 should contain 0246 <userinput>=B2 * C2</userinput>, D3 should be <userinput>=B3 * C3</userinput>, 0247 D4 should be <userinput>=B4 * C4</userinput> and so on. Instead of having to 0248 enter a different formula in each cell, you can just enter the first formula 0249 into D2 and then copy it into the cells below, letting &sheets; adjust the 0250 cell references to suit.</para> 0251 <mediaobject> 0252 <imageobject> 0253 <imagedata fileref="copy1.png" format="PNG"/> 0254 </imageobject> 0255 <textobject> 0256 <phrase>Screenshot copy1</phrase> 0257 </textobject> 0258 </mediaobject> 0259 0260 <sect2 id="copypasteareas"> 0261 <title>Copying and Pasting Cell Areas</title> 0262 <para>In the above example D2 can be copied into all three cells D3 to D5 at 0263 once by just copying D2 then selecting the complete cell area D3:D5 before 0264 doing the paste.</para> 0265 <para>A rectangular area of cells can be cut or copied in one operation by 0266 selecting the area before doing the cut or copy. Then select the top left 0267 corner cell of the area you want to paste into before doing the paste.</para> 0268 <para>If you cut or copy a rectangular area of cells, say B2:C3, and paste it 0269 into a larger area such as A10:D13 the original pattern of cells will be 0270 repeated to fill the target area.</para> 0271 <para>&sheets; also provides a <quote>Drag and Copy</quote> method for 0272 copying cells down into other cells immediately below or to the 0273 right of the original cell(s). To use this method select the cell(s) to be 0274 copied then position the mouse pointer over the small black square at the 0275 bottom right corner of the selected cell(s) so the cursor changes to a double 0276 headed arrow. Then hold the <mousebutton>left</mousebutton> mouse button down 0277 while you drag the selected cell(s) as far as you wish. Note that cell 0278 references in formulae are incremented according to the 0279 relative position change. Absolute references are not changed.</para> 0280 </sect2> 0281 0282 <sect2 id="specialpaste"> 0283 <title>Other Paste Modes</title> 0284 <para>A cell may contain text, a value, or a formula, and may also contain 0285 special font, border or background <link linkend="formatspread">formatting 0286 information</link>. &sheets; has special versions of Paste that let 0287 you handle these items in different ways.</para> 0288 0289 <para><menuchoice><guimenu>Edit</guimenu><guimenuitem>Special 0290 Paste...</guimenuitem></menuchoice>brings up the <guilabel> Special 0291 Paste</guilabel> dialog box. By selecting the appropriate item from 0292 the left part of this dialog you can choose to paste <guilabel>Everything</guilabel>, just 0293 <guilabel>Text</guilabel>, the cell <guilabel>Format</guilabel>, any 0294 <guilabel>Comment</guilabel> in the cell(s) or <guilabel>Everything 0295 without border</guilabel>. The items in the right part of this dialog 0296 box allow you to do simple <link linkend="sumspecialpaste">arithmetic 0297 on an area of cells</link>. 0298 </para> 0299 0300 <para><guimenuitem>Paste with Insertion...</guimenuitem> inserts the copied 0301 cell(s) into the sheet by moving the cells that would otherwise be overwritten 0302 a suitable number of rows of columns down or to the right. It can also be used 0303 to insert complete copied row(s) or column(s) into the worksheet.</para> 0304 </sect2> 0305 0306 </sect1> 0307 <!-- ME insdel --> 0308 <sect1 id="insdel"> 0309 <title>Insert and Delete</title> 0310 <para>Use the <keysym>Del</keysym> key or <menuchoice><guimenu>Edit</guimenu> 0311 <guisubmenu>Clear</guisubmenu><guimenuitem>Contents</guimenuitem> 0312 </menuchoice> to remove the text, value or formula from selected cell(s), 0313 row(s) or column(s) without affecting anything else.</para> 0314 0315 <para>To delete everything in the selected cell(s), row(s) or column(s), 0316 including comments and special formatting, choose the <guimenuitem>All</guimenuitem> 0317 option from the <menuchoice><guimenu>Edit</guimenu><guisubmenu>Clear</guisubmenu></menuchoice> 0318 menu or from the pop 0319 up menu you get when you <mousebutton>right</mousebutton> click on a selection. 0320 </para> 0321 <para>To remove selected row(s) or column(s) completely, use the 0322 <guimenuitem>Delete Rows</guimenuitem> or <guimenuitem>Delete 0323 Columns</guimenuitem> options from the <mousebutton>right</mousebutton> mouse 0324 button pop up menu.</para> 0325 <para>If you select a cell or cells and choose <guimenuitem>Remove Cells... 0326 </guimenuitem> from the <mousebutton>right</mousebutton> mouse button pop up 0327 menu, you can then choose whether other cells in the worksheet will be moved 0328 up or to the left to fill in the space left by the cell(s) you have chosen to 0329 remove.</para> 0330 <para>If you want to insert new, blank, row(s) or column(s) into the 0331 sheet, select row(s) or column(s) where you wish the new row(s) or 0332 column(s) to be placed and choose the <guimenuitem>Insert Rows</guimenuitem>, 0333 <guimenuitem>Insert Columns</guimenuitem> option from the <mousebutton> 0334 right</mousebutton> mouse button pop up menu.</para> 0335 <para>You can insert new cells into the worksheet by selecting the 0336 area where you want them to appear then choosing the <guimenuitem> 0337 Insert Cells...</guimenuitem> option from the <mousebutton>right</mousebutton> 0338 mouse button pop up menu. You will then be asked whether the existing cell(s) 0339 in the selected area should be moved down or to the right to make room for the 0340 new ones.</para> 0341 0342 </sect1> 0343 0344 <sect1 id="simplesums"> 0345 <title>Simple Sums</title> 0346 <para>If the first character in a cell is an equals sign (<keycap>=</keycap>) 0347 &sheets; will take the cell contents to be a formula which is to be 0348 calculated. The result of the calculation will be displayed in the cell rather 0349 than the formula itself. For example, enter <userinput>=2+3</userinput> 0350 into a cell and it should display <emphasis>5</emphasis>.</para> 0351 <para>More usefully, a formula can contain references to other cells, so 0352 that <userinput>=B4+A3</userinput> will calculate the sum of the values in 0353 cells B4 and A3, and this calculation will be updated whenever cells B4 or A3 0354 are changed.</para> 0355 <para>As well as addition, a formula can make use of the <keycap>-</keycap> 0356 symbol for subtraction, <keycap>*</keycap> for multiplication, and <keycap> 0357 /</keycap> to perform division. The round bracket symbols <keycap>(</keycap> 0358 and <keycap>)</keycap> can also be used as in normal algebra, so you could 0359 enter more complex formulae such as <userinput>=((B10 + C3) *5 - F11) / 2 0360 </userinput>.</para> 0361 0362 <para>Cells containing a formula will be marked with a small blue triangle 0363 at the bottom left corner if the <guilabel>Show formula indicator</guilabel> 0364 check box in the <menuchoice><guimenu>Format</guimenu> 0365 <guisubmenu>Sheet</guisubmenu><guisubmenu>Sheet Properties</guisubmenu> 0366 </menuchoice> dialog is checked.</para> 0367 <para>&sheets; also includes a large number of built-in functions for 0368 applications such as statistical, trigonometrical and financial calculations. 0369 Their use will be examined in more depth in a <link linkend="formulas"> 0370 later section</link> of this manual, but if you are interested at this stage 0371 choose <guimenuitem>Function...</guimenuitem> from the <guimenu>Insert</guimenu> 0372 menu and take a look through the <guilabel>Function</guilabel> dialog box 0373 that will be displayed.</para> 0374 <para>For the time being, however, the <userinput>SUM</userinput> function may 0375 be of interest as it calculates the sum of all values in a specified area of 0376 cells. For example <userinput>=SUM(B4:C10)</userinput> calculates the sum of 0377 all values in the cell area B4 to C10.</para> 0378 <para>If &sheets; displays <keycap>#VALUE!</keycap> when you have 0379 entered your formula this usually means that it cannot understand what 0380 you have entered, but if the row of symbols ends with a 0381 small red arrow this just means that the cell is not wide enough to display 0382 the complete result, in which case you should either make the cell(s) wider 0383 or change their <link linkend="formatdata">format</link> so that the result 0384 does fit properly.</para> 0385 0386 <sect2 id="recalc"> 0387 <title>Recalculation</title> 0388 <para>If the <guilabel>Automatic recalculation</guilabel> box in the 0389 <menuchoice><guimenu>Format</guimenu> 0390 <guisubmenu>Sheet</guisubmenu><guisubmenu>Sheet Properties</guisubmenu> 0391 </menuchoice> dialog box is 0392 checked, &sheets; will recalculate the values of cells whenever anything that 0393 affects them is changed in the sheet.</para> 0394 <para>When <guilabel>Automatic recalculation</guilabel> is not checked for the 0395 current sheet, you can instruct &sheets; to perform a recalculation at any time by 0396 using the <guimenuitem>Recalculate Sheet</guimenuitem> or <guimenuitem> 0397 Recalculate Document</guimenuitem> option in the <guimenu>Tools</guimenu> 0398 menu or their shortcuts <keycombo action="simul">&Shift;<keysym>F9</keysym> 0399 </keycombo> or <keysym>F9</keysym>.</para> 0400 </sect2> 0401 </sect1> 0402 0403 <sect1 id="sort"> 0404 <title>Sorting Data</title> 0405 <para>In the simple example shown below, the data consist of the names and 0406 countries of a number of mountains together with their height above sea level. 0407 &sheets; can sort data such as this in different ways.</para> 0408 <para> 0409 <mediaobject> 0410 <imageobject> 0411 <imagedata fileref="sort1.png" format="PNG"/> 0412 </imageobject> 0413 <textobject> 0414 <phrase>Screenshot of sorted data</phrase> 0415 </textobject> 0416 </mediaobject> 0417 </para> 0418 <para>We may want the data sorted so that the names are in 0419 alphabetical order. To do this select the area containing the data (A2:C7 0420 in this case) and choose <guimenuitem>Sort...</guimenuitem> from the <guimenu>Data</guimenu> 0421 menu. This opens the <guilabel>Sort</guilabel> dialog box.</para> 0422 <para>Sorting is done alphanumerically, and the default is case sensitive, numbers coming 0423 before uppercase letters which come before lowercase letters, so that cells 0424 containing the entries <userinput>Cat</userinput>, <userinput>bar</userinput>, 0425 <userinput>77</userinput> and <userinput>Bat</userinput> would be sorted into 0426 the following order: <emphasis>77 Bat Cat bar</emphasis>.</para> 0427 <!-- Obsolete, AFAICT (Phil) 0428 <para>The <guimenuitem>Sort Increasing</guimenuitem> and <guimenuitem>Sort 0429 Decreasing</guimenuitem> options from the <guimenu>Data</guimenu> menu options 0430 sort the data according to the contents of the cells in the left column of the 0431 selected area. For more complex sorting select <menuchoice><guimenu>Data 0432 </guimenu><guimenuitem>Sort...</guimenuitem></menuchoice> to bring up the 0433 <guilabel>Sort</guilabel> dialog box.</para> 0434 --> 0435 <para>In the <guilabel>Direction</guilabel> area of this dialog box 0436 select to sort in rows or columns. 0437 If you check the <guilabel>First row contains column headers</guilabel> or 0438 <guilabel>First column contains row headers</guilabel> box data in the 0439 first row or column will not be included in the sort operation.</para> 0440 <para>The rows or columns are sorted in the specified order, which can be changed 0441 using the <guibutton>Move Up</guibutton> and <guibutton>Move Down</guibutton> buttons. 0442 Using the example in the above screenshot, choosing column B as the first key and 0443 column C as the second would sort the data by country and, for each country, 0444 by height.</para> 0445 <para>Uncheck the option <guilabel>Case Sensitive</guilabel> to get a sort 0446 not depending on capitalization and switch the sort order between <guilabel>Ascending</guilabel> 0447 and <guilabel>Descending</guilabel> by clicking on the cells in the column 0448 <guilabel>Sort Order</guilabel>. 0449 </para> 0450 0451 <para>The <guilabel>Details >></guilabel> extension of the dialog allows you to sort using the 0452 order of items in a custom list such as January, February... instead 0453 of alphanumerically. 0454 The cell format is moved with the cell content, if you select 0455 <guilabel>Copy cell formatting (Borders, Colors, Text Style)</guilabel>. 0456 </para> 0457 </sect1> 0458 0459 0460 <sect1 id="statusbarsum"> 0461 <title>The Status bar Summary Calculator</title> 0462 <para>The left hand end of the Status bar by default shows a summary of the values in 0463 the selected cell(s). According to the setting of the <guilabel>Function shown in 0464 status bar</guilabel> combo box in the <guilabel>Interface</guilabel> page of 0465 &sheets;'s configuration dialog the summary can be:</para> 0466 0467 <variablelist> 0468 <varlistentry> 0469 <term><guilabel>None</guilabel></term> 0470 <listitem><para>No summary calculation is performed. 0471 </para></listitem> 0472 </varlistentry> 0473 0474 <varlistentry> 0475 <term><guilabel>Average</guilabel></term> 0476 <listitem><para>The value displayed is the average of the values in the selected 0477 cells. 0478 </para></listitem> 0479 </varlistentry> 0480 0481 <varlistentry> 0482 <term><guilabel>Count</guilabel></term> 0483 <listitem><para>The value displayed is the number of cells containing numeric 0484 values. 0485 </para></listitem> 0486 </varlistentry> 0487 0488 <varlistentry> 0489 <term><guilabel>CountA</guilabel></term> 0490 <listitem><para>The value displayed is the number of non empty cells. 0491 </para></listitem> 0492 </varlistentry> 0493 0494 <varlistentry> 0495 <term><guilabel>Max</guilabel></term> 0496 <listitem><para>The value displayed is the maximum of the values in the selected 0497 cells. 0498 </para></listitem> 0499 </varlistentry> 0500 0501 <varlistentry> 0502 <term><guilabel>Min</guilabel></term> 0503 <listitem><para>The value displayed is the minimum of the values in the selected 0504 cells. 0505 </para></listitem> 0506 </varlistentry> 0507 0508 <varlistentry> 0509 <term><guilabel>Sum</guilabel></term> 0510 <listitem><para>The value displayed is the sum of the values in the selected 0511 cells. 0512 </para></listitem> 0513 </varlistentry> 0514 0515 </variablelist> 0516 <para>The method of calculation can also be changed by <mousebutton>right 0517 </mousebutton> clicking on the summary calculation result area of the 0518 Status bar and choosing an item from the pop up menu.</para> 0519 0520 </sect1> 0521 0522 <sect1 id="saving"> 0523 <title>Saving your Work</title> 0524 <para>&sheets; saves the complete document, which may include more than one 0525 worksheet, as a single document file.</para> 0526 <para>If you have created a new document, or want to save an existing one 0527 under a different name, use <menuchoice><guimenu>File</guimenu><guimenuitem> 0528 Save As...</guimenuitem></menuchoice>. This will bring up &kde;'s common 0529 <guilabel>Save Document As</guilabel> dialog box. 0530 Choose the folder where you want to save the document and enter a 0531 suitable file name into the <guilabel>Name</guilabel> text box. &sheets; 0532 documents are normally automatically saved with a <filename>.ods</filename> 0533 extension, you do not need to add this to the filename but do make sure that 0534 the <guilabel>Filter</guilabel> selection is set to 0535 <guilabel>OpenDocument SpreadSheet</guilabel>.</para> 0536 <para>To save your document without changing its name, just use <menuchoice> 0537 <guimenu>File</guimenu><guimenuitem>Save</guimenuitem></menuchoice>.</para> 0538 0539 <para>You can also save a &sheets; document in a foreign format selecting the 0540 format from the <guilabel>Filter:</guilabel> combo box.</para> 0541 <para>When you save a modified version of an existing document 0542 &sheets; will keep the previous version as a backup file, adding a 0543 <literal>~</literal> to the end of the filename.</para> 0544 <para>&sheets; can provide some protection against losing your work because 0545 of a computer crash or because you have closed &sheets; without saving the 0546 current document. It does this by automatically saving the latest version of 0547 the document you are working on every few minutes using a modified file name. 0548 The autosaved version is normally removed when you next save your document, 0549 so that it will only exist if it is more up to date than the version that was 0550 saved manually. 0551 When you open a document &sheets; checks to see if an autosaved 0552 version exists, and if it finds one it will offer to open that instead.</para> 0553 <para>Autosaved documents are saved with a file name of the form 0554 <filename>.yourfilename.autosave</filename> (note the leading period), 0555 so that <filename>spread1.ods</filename> would be autosaved as 0556 <filename>.spread1.ods.autosave</filename>. The autosave feature is 0557 user configurable in the <link linkend="configopensave">settings dialog</link>.</para> 0558 0559 <sect2 id="templates"> 0560 <title>Templates</title> 0561 <para>If you are going to be creating a lot of similar documents you can 0562 save yourself time and trouble by first creating a template and then 0563 using that as the basis for the individual documents.</para> 0564 <para>To do this first create a document containing the common elements, 0565 then save it as a template by choosing <menuchoice><guimenu>File</guimenu> 0566 <guimenuitem>Create Template From Document</guimenuitem></menuchoice>. 0567 Doing this opens the <guilabel>Create Template</guilabel> dialog box. 0568 Enter a name for your new template into the <guilabel>Name:</guilabel> text 0569 box and press <guibutton>OK</guibutton>. The next time you start a new 0570 document by choosing <menuchoice><guimenu>File</guimenu> 0571 <guimenuitem>New</guimenuitem></menuchoice> or when you next start &sheets; the 0572 startup dialog window will give you the option of creating the 0573 new document from your template.</para> 0574 <para>The <guilabel>Create Template</guilabel> dialog box also lets you 0575 choose a different picture to be displayed above the template name in the 0576 startup dialog window, and lets you save your templates 0577 under different group names, which will appear as different pages in 0578 the dialog.</para> 0579 <para>Templates are stored as <literal role="extension">.kst</literal> files under 0580 <filename>~/.kde/share/apps/tables/templates/</filename>. 0581 </para> 0582 </sect2> 0583 0584 </sect1> 0585 0586 <sect1 id="printing"> 0587 <title>Printing a Spreadsheet</title> 0588 <para>Printing a spreadsheet is basically done by selecting <menuchoice> 0589 <guimenu>File</guimenu><guimenuitem>Print...</guimenuitem></menuchoice> which 0590 brings up &kde;'s common <guilabel>Print</guilabel> dialog box where you can 0591 choose, among other options, the printer to be used, the number of copies and 0592 whether all or only selected pages are to be printed.</para> 0593 <para>By default &sheets; will print all items in the current worksheet, but 0594 you can restrict this by first selecting the area that you want to be 0595 printed then choosing <guimenuitem>Define Print Range</guimenuitem> from the 0596 <menuchoice><guimenu>Format</guimenu><guisubmenu>Print Range</guisubmenu> 0597 </menuchoice> sub menu.</para> 0598 <para>&sheets; will print as many pages as are necessary to include all 0599 items in the current worksheet. You can quickly see how a worksheet will be 0600 split into separate pages for printing by checking the <menuchoice> 0601 <guimenu>View</guimenu> 0602 <guimenuitem>Page Borders</guimenuitem></menuchoice> box. The boundaries 0603 of each printed page will then be marked by colored lines in the 0604 worksheet.</para> 0605 0606 <para>For a more detailed view of what is to be sent to the printer, including 0607 anything you have asked to be included in the page headers and footers (see 0608 below), choose <menuchoice><guimenu>File</guimenu><guimenuitem>Print 0609 Preview...</guimenuitem></menuchoice>.</para> 0610 0611 <para>To improve the appearance of the printed output , you can change the 0612 fonts, colors, borders and sizes of the cells in the worksheet, see the 0613 <link linkend="formatspread">Spreadsheet Formatting</link> section for more 0614 details about how to do this.</para> 0615 0616 <para>You can also use the <guilabel>Page Layout</guilabel> dialog box, 0617 invoked by selecting <menuchoice><guimenu>Format</guimenu><guimenuitem>Page 0618 Layout...</guimenuitem></menuchoice>, to change the orientation of the printed 0619 pages, the paper size (this should be suitable for your printer) and the size 0620 of the page borders.</para> 0621 <para>The <guilabel>Sheet</guilabel> provides more options. 0622 The <guilabel>Print settings</guilabel> section lets you select whether or not to print the grid, 0623 comment indicators and formula indicators, objects and charts. 0624 The <guilabel>Repetitions on each page</guilabel> section allows you to repeat selected column(s) or row(s) on each printed 0625 page. 0626 In the section <guilabel>Scaling</guilabel> you can set a scalefactor 0627 or the page limits for the print.</para> 0628 0629 </sect1> 0630 0631 </chapter> 0632 0633 <!-- 0634 Local Variables: 0635 mode: sgml 0636 sgml-parent-document: ("index.docbook" "book" "chapter") 0637 sgml-minimize-attributes:nil 0638 sgml-general-insert-case:lower 0639 sgml-indent-step:0 0640 sgml-indent-data:nil 0641 End: 0642 -->