Files
help/helpcontent2/source/text/scalc/guide/integer_leading_zero.xhp
Rüdiger Timm 2ff568fcae INTEGRATION: CWS helpcontentbeta (1.1.2); FILE MERGED
2004/10/06 14:55:29 fpe 1.1.2.2: Regular Update
2004/09/16 11:46:30 fpe 1.1.2.1: Regular Update
2004-11-26 18:57:55 +00:00

125 lines
6.4 KiB
XML
Executable File

<?xml version="1.0" encoding="UTF-8"?>
<!--***********************************************************************
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRUNTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRUNTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc..
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************-->
<helpdocument version="1.0">
<meta>
<topic id="textscalcguideinteger_leading_zeroxml" indexer="include" status="PUBLISH">
<title id="tit" xml-lang="en-US">Entering a Number with Leading Zeros</title>
<filename>/text/scalc/guide/integer_leading_zero.xhp</filename>
</topic>
<history>
<created date="2003-10-31T00:00:00">Sun Microsystems, Inc.</created>
<lastedited date="2004-08-16T13:18:07">converted from old format - fpe</lastedited>
</history>
</meta>
<body>
<bookmark xml-lang="en-US" branch="index" id="bm_id3147560"><bookmark_value>zero values; entering leading zeros</bookmark_value>
<bookmark_value>numbers; with leading zeros</bookmark_value>
<bookmark_value>leading zeros</bookmark_value>
<bookmark_value>integers with leading zeros</bookmark_value>
<bookmark_value>numbers; changing text/number formats</bookmark_value>
<bookmark_value>cells; changing text/number formats</bookmark_value>
<bookmark_value>formats; changing text/number</bookmark_value>
<bookmark_value>text in cells; changing to numbers</bookmark_value>
</bookmark>
<paragraph role="heading" id="hd_id3147560" xml-lang="en-US" level="1" l10n="U" oldref="67"><variable id="integer_leading_zero"><link href="text/scalc/guide/integer_leading_zero.xhp" name="Entering a Number with Leading Zeros">Entering a Number with Leading Zeros</link>
</variable></paragraph>
<section id="inttext">
<paragraph role="paragraph" id="par_id3153194" xml-lang="en-US" l10n="U" oldref="55">There are various ways to enter integers starting with a zero:</paragraph>
<list type="unordered">
<listitem>
<paragraph role="listitem" id="par_id3146119" xml-lang="en-US" l10n="U" oldref="56">Enter the number as text. The easiest way is to enter the number starting with an apostrophe (for example, '0987). The apostrophe will not appear in the cell, and the number will be formatted as text. Because it is in text format, however, you cannot calculate with this number.</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3154013" xml-lang="en-US" l10n="U" oldref="57">Format a cell with a number format such as \0000. This format can be assigned in the <emph>Format code</emph> field under the <emph>Format - Cells - Numbers</emph> tab, and defines the cell display as "always put a zero first and then the integer, having at least three places, and filled with zeros at the left if less than three digits".</paragraph>
</listitem>
</list>
<paragraph role="paragraph" id="par_id3150011" xml-lang="en-US" l10n="E" oldref="66" localize="false"/>
<paragraph role="paragraph" id="par_id3153158" xml-lang="en-US" l10n="U" oldref="58">If you want to apply a numerical format to a column of numbers in text format (for example, text "000123" becomes number "123"), do the following:</paragraph>
<list type="ordered">
<listitem>
<paragraph role="listitem" id="par_id3149377" xml-lang="en-US" l10n="U" oldref="59">Select the column in which the digits are found in text format. Set the cell format in that column as "Number".</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3154944" xml-lang="en-US" l10n="U" oldref="60">Choose <emph>Edit - Find &amp; Replace</emph>
</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3154510" xml-lang="en-US" l10n="U" oldref="61">In the <emph>Search for</emph> box, enter ^[0-9]</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3155068" xml-lang="en-US" l10n="U" oldref="62">In the <emph>Replace with</emph> box, enter &amp;</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3149018" xml-lang="en-US" l10n="U" oldref="63">Check <emph>Regular expressions</emph>
</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3156382" xml-lang="en-US" l10n="U" oldref="64">Check <emph>Current selection only</emph>
</paragraph>
</listitem>
<listitem>
<paragraph role="listitem" id="par_id3146916" xml-lang="en-US" l10n="U" oldref="65">Click <emph>Replace All</emph>
</paragraph>
</listitem>
</list>
</section>
<section id="relatedtopics">
<embed href="text/scalc/guide/text_numbers.xhp#text_numbers"/>
<embed href="text/scalc/guide/format_value.xhp#format_value"/>
</section></body>
</helpdocument>