diff options
Diffstat (limited to 'source/pt/helpcontent2/source/text/sbasic/guide.po')
-rw-r--r-- | source/pt/helpcontent2/source/text/sbasic/guide.po | 344 |
1 files changed, 343 insertions, 1 deletions
diff --git a/source/pt/helpcontent2/source/text/sbasic/guide.po b/source/pt/helpcontent2/source/text/sbasic/guide.po index 8fc5e670fb6..d204c708b45 100644 --- a/source/pt/helpcontent2/source/text/sbasic/guide.po +++ b/source/pt/helpcontent2/source/text/sbasic/guide.po @@ -3,7 +3,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://bugs.libreoffice.org/enter_bug.cgi?product=LibreOffice&bug_status=UNCONFIRMED&component=UI\n" -"POT-Creation-Date: 2021-09-20 13:02+0200\n" +"POT-Creation-Date: 2021-10-20 13:08+0200\n" "PO-Revision-Date: 2021-05-25 14:37+0000\n" "Last-Translator: Sérgio Marques <smarquespt@gmail.com>\n" "Language-Team: Portuguese <https://translations.documentfoundation.org/projects/libo_help-master/textsbasicguide/pt/>\n" @@ -1249,6 +1249,348 @@ msgctxt "" msgid "On the dialog, drag the button to the size you want." msgstr "Na caixa de diálogo, arraste o botão até ao tamanho pretendido." +#. fRi68 +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"tit\n" +"help.text" +msgid "Reading and Writing values to Ranges" +msgstr "" + +#. 3hH3s +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"hd_id461623364876507\n" +"help.text" +msgid "<variable id=\"title\"><link href=\"text/sbasic/guide/read_write_values.xhp\" name=\"ReadWriteValues_h1\">Reading and Writing values to Ranges</link></variable>" +msgstr "" + +#. ZKUBE +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"par_id781633210592228\n" +"help.text" +msgid "Macros in %PRODUCTNAME Calc often need to read and write values from/to sheets. This help page describes the various approaches to accessing sheets and ranges to read or write their values." +msgstr "" + +#. D4ZJu +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"par_id191633214565965\n" +"help.text" +msgid "All examples presented in this page can be implemented both in Basic and Python." +msgstr "" + +#. LfNCy +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"hd_id331633213558740\n" +"help.text" +msgid "Accessing a Single Cell" +msgstr "" + +#. A5M3f +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"par_id731633213581386\n" +"help.text" +msgid "The example below enters the numeric value 123 into cell \"A1\" of the current sheet." +msgstr "" + +#. G6yWX +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"par_id131633213887433\n" +"help.text" +msgid "The same can be accomplished with Python:" +msgstr "" + +#. CDmg6 +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"par_id861633214219511\n" +"help.text" +msgid "Note that in the previous examples the cell is accessed using its range name \"A1\". It is also possible to access cells using indices as though the sheet were a matrix where columns and rows are indexed starting from zero." +msgstr "" + +#. Jja4D +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"par_id161633214461067\n" +"help.text" +msgid "This can be done using the <literal>getCellByPosition(colIndex, rowIndex)</literal> method, that takes in a column and a row index. The example below in Basic changes the text value in cell \"C1\" (column 2, row 0)." +msgstr "" + +#. 5tsZR +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"par_id221633214713436\n" +"help.text" +msgid "This example can also be implemented in Python as follows:" +msgstr "" + +#. h6eq5 +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"par_id101633215142970\n" +"help.text" +msgid "The main difference between Python and Basic scripts lies on how to get access to the sheet object by using the <literal>XSCRIPTCONTEXT</literal> context variable. After that, all methods and properties are identical in Basic and Python." +msgstr "" + +#. PmETF +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"hd_id411633215666257\n" +"help.text" +msgid "Values, Strings and Formulas" +msgstr "" + +#. MBHDg +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"par_id861633215682610\n" +"help.text" +msgid "Calc cells can have three types of values: numeric, strings and formulas. Each type has its own set and get methods:" +msgstr "" + +#. RXE76 +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"par_id191633215791905\n" +"help.text" +msgid "Type" +msgstr "" + +#. rYCuZ +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"par_id181633215791905\n" +"help.text" +msgid "Numeric" +msgstr "" + +#. ywHfC +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"par_id961633215932180\n" +"help.text" +msgid "Text" +msgstr "" + +#. KH9Ya +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"par_id651633215984116\n" +"help.text" +msgid "Formula" +msgstr "" + +#. nGhov +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"par_id21633215845395\n" +"help.text" +msgid "Dates and currency values are considered as numeric values in Calc." +msgstr "" + +#. t87Qx +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"par_id221633216111353\n" +"help.text" +msgid "The following example enters numeric values into cells \"A1\" and \"A2\" and inserts a formula in cell \"A3\" that returns the multiplication of these values." +msgstr "" + +#. r6BG6 +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"hd_id321633216630043\n" +"help.text" +msgid "Accessing Ranges in Different Sheets" +msgstr "" + +#. TFU8U +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"par_id371633216672570\n" +"help.text" +msgid "The previous examples used only the active sheet to perform operations. It is possible to access cell ranges in different sheets by their indices or names." +msgstr "" + +#. c3yhF +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"par_id861633216843382\n" +"help.text" +msgid "The example below enters a numeric value into cell \"A1\" of the sheet named \"Sheet2\"." +msgstr "" + +#. GpnNS +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"par_id611633217090743\n" +"help.text" +msgid "This example can also be implemented in Python as follows:" +msgstr "" + +#. xGQ3k +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"par_id631633217279518\n" +"help.text" +msgid "Sheets can also be accessed using zero-based indices indicating which sheet considering the order they appear in the Calc file." +msgstr "" + +#. tSo3e +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"par_id291633264880172\n" +"help.text" +msgid "In Basic, instead of using the <literal>getByName</literal> method, use <literal>Sheets(sheetIndex)</literal> as shown next:" +msgstr "" + +#. svDuj +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"par_id891633265000047\n" +"help.text" +msgid "This can be done in a similar fashion in Python:" +msgstr "" + +#. 6qHAn +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"hd_id451633265241066\n" +"help.text" +msgid "Using the ScriptForge Library" +msgstr "" + +#. 8CkSe +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"par_id731633265268585\n" +"help.text" +msgid "The Calc service of the ScriptForge library can be used to get and set cell values as follows:" +msgstr "" + +#. DCJ2E +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"par_id551633265526538\n" +"help.text" +msgid "' Loads the ScriptForge library" +msgstr "" + +#. hgDyM +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"par_id581633265527001\n" +"help.text" +msgid "' Gets access to the current Calc document" +msgstr "" + +#. Gw4KG +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"par_id751633265527427\n" +"help.text" +msgid "' Sets the value of cells A1 and A2" +msgstr "" + +#. VUWVE +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"par_id781633267324929\n" +"help.text" +msgid "The <literal>setValue</literal> method can be used to set both numeric and text values. To set a cell formula, use the <literal>setFormula</literal> method." +msgstr "" + +#. jPRii +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"par_id251633265634883\n" +"help.text" +msgid "With the Calc service, getting and setting cell values can be done with a single line of code. The example below gets the value from cell \"A1\" and shows it on a message box." +msgstr "" + +#. NzUg4 +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"par_id521633608223310\n" +"help.text" +msgid "The ScriptForge library also makes it simpler to access ranges in different sheets, as demonstrated in the example below:" +msgstr "" + +#. CCeEh +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"bas_id521633608366292\n" +"help.text" +msgid "' Gets cell \"A1\" from the sheet named \"Sheet1\"" +msgstr "" + +#. qUTqA +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"bas_id661633608366484\n" +"help.text" +msgid "' Gets cell \"B3\" from the sheet named \"Sheet2\"" +msgstr "" + +#. mCX5W +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"bas_id501633608516381\n" +"help.text" +msgid "' Places the result into cell \"A1\" of sheet \"Report\"" +msgstr "" + +#. ZdkEz +#: read_write_values.xhp +msgctxt "" +"read_write_values.xhp\n" +"par_id431633266057163\n" +"help.text" +msgid "The examples above can also be implemented in Python as follows:" +msgstr "" + #. ayg6P #: sample_code.xhp msgctxt "" |