End document for sheets
This commit is contained in:
parent
686f1f6aea
commit
043e5f5f29
Binary file not shown.
Binary file not shown.
|
@ -163,26 +163,49 @@ Move
|
|||
|
||||
* Move to position.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
sheet = doc[0]
|
||||
doc.move(sheet, 2)
|
||||
|
||||
* Move from sheet
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
sheet = app.active_sheet
|
||||
sheet.move()
|
||||
|
||||
* Move to position.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
sheet = app.active_sheet
|
||||
sheet.move(2)
|
||||
|
||||
|
||||
Remove
|
||||
~~~~~~
|
||||
|
||||
* Remove by object
|
||||
* Remove by object.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
sheet = doc[0]
|
||||
doc.remove(sheet)
|
||||
|
||||
* Remove by name
|
||||
* Remove by name.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
doc.remove('One')
|
||||
|
||||
* Remove from sheet.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
sheet = app.active_sheet
|
||||
sheet.remove()
|
||||
|
||||
|
||||
Copy
|
||||
~~~~
|
||||
|
@ -202,6 +225,13 @@ Copy
|
|||
|
||||
doc.copy('Sheet1', 'Sheet2')
|
||||
|
||||
* From sheet
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
sheet = app.active_sheet
|
||||
sheet.copy(sheet.name + '_2')
|
||||
|
||||
|
||||
Copy from
|
||||
~~~~~~~~~
|
||||
|
@ -217,6 +247,27 @@ Copy from
|
|||
position = 0
|
||||
doc.copy_from(doc_source, name_source, name_target, position)
|
||||
|
||||
|
||||
Copy to
|
||||
~~~~~~~
|
||||
|
||||
* Copy from sheet with the same name
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
doc = app.docs.new()
|
||||
sheet = app.active_sheet
|
||||
sheet.copy_to(doc)
|
||||
|
||||
* Used new name
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
doc = app.docs.new()
|
||||
sheet = app.active_sheet
|
||||
sheet.copy_to(doc, 'NewName')
|
||||
|
||||
|
||||
Sort
|
||||
~~~~
|
||||
|
||||
|
@ -266,3 +317,82 @@ Visible
|
|||
app.msgbox(sheet.visible)
|
||||
sheet.visible = not sheet.visible
|
||||
|
||||
|
||||
Is protected
|
||||
~~~~~~~~~~~~
|
||||
|
||||
* If sheet is protected with password.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
sheet = app.active_sheet
|
||||
app.msgbox(sheet.is_protected)
|
||||
|
||||
|
||||
Set password
|
||||
~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
sheet = app.active_sheet
|
||||
sheet.password = 'letmein'
|
||||
app.msgbox(sheet.is_protected)
|
||||
|
||||
|
||||
Remove password
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
sheet = app.active_sheet
|
||||
sheet.password = 'letmein'
|
||||
app.msgbox(sheet.is_protected)
|
||||
|
||||
sheet.unprotect('letmein')
|
||||
app.msgbox(sheet.is_protected)
|
||||
|
||||
|
||||
Tab color
|
||||
~~~~~~~~~
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
sheet = app.active_sheet
|
||||
app.msgbox(sheet.color)
|
||||
|
||||
sheet.color = 'red'
|
||||
app.msgbox(sheet.color)
|
||||
|
||||
# RGB
|
||||
sheet.color = (125, 200, 10)
|
||||
app.msgbox(sheet.color)
|
||||
|
||||
|
||||
Document parent
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
doc = sheet.doc
|
||||
|
||||
|
||||
Activate
|
||||
~~~~~~~~
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
doc = app.active
|
||||
# Get last sheet
|
||||
sheet = doc[-1]
|
||||
|
||||
# Activate from doc
|
||||
doc.activate(sheet)
|
||||
|
||||
# Activate from sheet
|
||||
sheet.activate()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -173,30 +173,50 @@
|
|||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">doc</span><span class="o">.</span><span class="n">move</span><span class="p">(</span><span class="s1">'Sheet1'</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<ul>
|
||||
<li><p>Move to position.</p>
|
||||
<blockquote>
|
||||
<div><p>sheet = doc[0]
|
||||
doc.move(sheet, 2)</p>
|
||||
</div></blockquote>
|
||||
</li>
|
||||
<ul class="simple">
|
||||
<li><p>Move to position.</p></li>
|
||||
</ul>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">sheet</span> <span class="o">=</span> <span class="n">doc</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
|
||||
<span class="n">doc</span><span class="o">.</span><span class="n">move</span><span class="p">(</span><span class="n">sheet</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<ul class="simple">
|
||||
<li><p>Move from sheet</p></li>
|
||||
</ul>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">sheet</span> <span class="o">=</span> <span class="n">app</span><span class="o">.</span><span class="n">active_sheet</span>
|
||||
<span class="n">sheet</span><span class="o">.</span><span class="n">move</span><span class="p">()</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<ul class="simple">
|
||||
<li><p>Move to position.</p></li>
|
||||
</ul>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">sheet</span> <span class="o">=</span> <span class="n">app</span><span class="o">.</span><span class="n">active_sheet</span>
|
||||
<span class="n">sheet</span><span class="o">.</span><span class="n">move</span><span class="p">(</span><span class="mi">2</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="remove">
|
||||
<h2>Remove<a class="headerlink" href="#remove" title="Permalink to this headline">¶</a></h2>
|
||||
<ul class="simple">
|
||||
<li><p>Remove by object</p></li>
|
||||
<li><p>Remove by object.</p></li>
|
||||
</ul>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">sheet</span> <span class="o">=</span> <span class="n">doc</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
|
||||
<span class="n">doc</span><span class="o">.</span><span class="n">remove</span><span class="p">(</span><span class="n">sheet</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<ul class="simple">
|
||||
<li><p>Remove by name</p></li>
|
||||
<li><p>Remove by name.</p></li>
|
||||
</ul>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">doc</span><span class="o">.</span><span class="n">remove</span><span class="p">(</span><span class="s1">'One'</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<ul class="simple">
|
||||
<li><p>Remove from sheet.</p></li>
|
||||
</ul>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">sheet</span> <span class="o">=</span> <span class="n">app</span><span class="o">.</span><span class="n">active_sheet</span>
|
||||
<span class="n">sheet</span><span class="o">.</span><span class="n">remove</span><span class="p">()</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="copy">
|
||||
<h2>Copy<a class="headerlink" href="#copy" title="Permalink to this headline">¶</a></h2>
|
||||
|
@ -214,6 +234,13 @@ doc.move(sheet, 2)</p>
|
|||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">doc</span><span class="o">.</span><span class="n">copy</span><span class="p">(</span><span class="s1">'Sheet1'</span><span class="p">,</span> <span class="s1">'Sheet2'</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<ul class="simple">
|
||||
<li><p>From sheet</p></li>
|
||||
</ul>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">sheet</span> <span class="o">=</span> <span class="n">app</span><span class="o">.</span><span class="n">active_sheet</span>
|
||||
<span class="n">sheet</span><span class="o">.</span><span class="n">copy</span><span class="p">(</span><span class="n">sheet</span><span class="o">.</span><span class="n">name</span> <span class="o">+</span> <span class="s1">'_2'</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="copy-from">
|
||||
<h2>Copy from<a class="headerlink" href="#copy-from" title="Permalink to this headline">¶</a></h2>
|
||||
|
@ -229,6 +256,25 @@ doc.move(sheet, 2)</p>
|
|||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="copy-to">
|
||||
<h2>Copy to<a class="headerlink" href="#copy-to" title="Permalink to this headline">¶</a></h2>
|
||||
<ul class="simple">
|
||||
<li><p>Copy from sheet with the same name</p></li>
|
||||
</ul>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">doc</span> <span class="o">=</span> <span class="n">app</span><span class="o">.</span><span class="n">docs</span><span class="o">.</span><span class="n">new</span><span class="p">()</span>
|
||||
<span class="n">sheet</span> <span class="o">=</span> <span class="n">app</span><span class="o">.</span><span class="n">active_sheet</span>
|
||||
<span class="n">sheet</span><span class="o">.</span><span class="n">copy_to</span><span class="p">(</span><span class="n">doc</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<ul class="simple">
|
||||
<li><p>Used new name</p></li>
|
||||
</ul>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">doc</span> <span class="o">=</span> <span class="n">app</span><span class="o">.</span><span class="n">docs</span><span class="o">.</span><span class="n">new</span><span class="p">()</span>
|
||||
<span class="n">sheet</span> <span class="o">=</span> <span class="n">app</span><span class="o">.</span><span class="n">active_sheet</span>
|
||||
<span class="n">sheet</span><span class="o">.</span><span class="n">copy_to</span><span class="p">(</span><span class="n">doc</span><span class="p">,</span> <span class="s1">'NewName'</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="sort">
|
||||
<h2>Sort<a class="headerlink" href="#sort" title="Permalink to this headline">¶</a></h2>
|
||||
<ul class="simple">
|
||||
|
@ -276,6 +322,69 @@ doc.move(sheet, 2)</p>
|
|||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="is-protected">
|
||||
<h2>Is protected<a class="headerlink" href="#is-protected" title="Permalink to this headline">¶</a></h2>
|
||||
<ul class="simple">
|
||||
<li><p>If sheet is protected with password.</p></li>
|
||||
</ul>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">sheet</span> <span class="o">=</span> <span class="n">app</span><span class="o">.</span><span class="n">active_sheet</span>
|
||||
<span class="n">app</span><span class="o">.</span><span class="n">msgbox</span><span class="p">(</span><span class="n">sheet</span><span class="o">.</span><span class="n">is_protected</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="set-password">
|
||||
<h2>Set password<a class="headerlink" href="#set-password" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">sheet</span> <span class="o">=</span> <span class="n">app</span><span class="o">.</span><span class="n">active_sheet</span>
|
||||
<span class="n">sheet</span><span class="o">.</span><span class="n">password</span> <span class="o">=</span> <span class="s1">'letmein'</span>
|
||||
<span class="n">app</span><span class="o">.</span><span class="n">msgbox</span><span class="p">(</span><span class="n">sheet</span><span class="o">.</span><span class="n">is_protected</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="remove-password">
|
||||
<h2>Remove password<a class="headerlink" href="#remove-password" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">sheet</span> <span class="o">=</span> <span class="n">app</span><span class="o">.</span><span class="n">active_sheet</span>
|
||||
<span class="n">sheet</span><span class="o">.</span><span class="n">password</span> <span class="o">=</span> <span class="s1">'letmein'</span>
|
||||
<span class="n">app</span><span class="o">.</span><span class="n">msgbox</span><span class="p">(</span><span class="n">sheet</span><span class="o">.</span><span class="n">is_protected</span><span class="p">)</span>
|
||||
|
||||
<span class="n">sheet</span><span class="o">.</span><span class="n">unprotect</span><span class="p">(</span><span class="s1">'letmein'</span><span class="p">)</span>
|
||||
<span class="n">app</span><span class="o">.</span><span class="n">msgbox</span><span class="p">(</span><span class="n">sheet</span><span class="o">.</span><span class="n">is_protected</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="tab-color">
|
||||
<h2>Tab color<a class="headerlink" href="#tab-color" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">sheet</span> <span class="o">=</span> <span class="n">app</span><span class="o">.</span><span class="n">active_sheet</span>
|
||||
<span class="n">app</span><span class="o">.</span><span class="n">msgbox</span><span class="p">(</span><span class="n">sheet</span><span class="o">.</span><span class="n">color</span><span class="p">)</span>
|
||||
|
||||
<span class="n">sheet</span><span class="o">.</span><span class="n">color</span> <span class="o">=</span> <span class="s1">'red'</span>
|
||||
<span class="n">app</span><span class="o">.</span><span class="n">msgbox</span><span class="p">(</span><span class="n">sheet</span><span class="o">.</span><span class="n">color</span><span class="p">)</span>
|
||||
|
||||
<span class="c1"># RGB</span>
|
||||
<span class="n">sheet</span><span class="o">.</span><span class="n">color</span> <span class="o">=</span> <span class="p">(</span><span class="mi">125</span><span class="p">,</span> <span class="mi">200</span><span class="p">,</span> <span class="mi">10</span><span class="p">)</span>
|
||||
<span class="n">app</span><span class="o">.</span><span class="n">msgbox</span><span class="p">(</span><span class="n">sheet</span><span class="o">.</span><span class="n">color</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="document-parent">
|
||||
<h2>Document parent<a class="headerlink" href="#document-parent" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">doc</span> <span class="o">=</span> <span class="n">sheet</span><span class="o">.</span><span class="n">doc</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="activate">
|
||||
<h2>Activate<a class="headerlink" href="#activate" title="Permalink to this headline">¶</a></h2>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">doc</span> <span class="o">=</span> <span class="n">app</span><span class="o">.</span><span class="n">active</span>
|
||||
<span class="c1"># Get last sheet</span>
|
||||
<span class="n">sheet</span> <span class="o">=</span> <span class="n">doc</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>
|
||||
|
||||
<span class="c1"># Activate from doc</span>
|
||||
<span class="n">doc</span><span class="o">.</span><span class="n">activate</span><span class="p">(</span><span class="n">sheet</span><span class="p">)</span>
|
||||
|
||||
<span class="c1"># Activate from sheet</span>
|
||||
<span class="n">sheet</span><span class="o">.</span><span class="n">activate</span><span class="p">()</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
|
|
|
@ -155,10 +155,17 @@
|
|||
<li class="toctree-l2"><a class="reference internal" href="calc.html#remove">Remove</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="calc.html#copy">Copy</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="calc.html#copy-from">Copy from</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="calc.html#copy-to">Copy to</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="calc.html#sort">Sort</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="calc.html#name">Name</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="calc.html#code-name">Code name</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="calc.html#visible">Visible</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="calc.html#is-protected">Is protected</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="calc.html#set-password">Set password</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="calc.html#remove-password">Remove password</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="calc.html#tab-color">Tab color</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="calc.html#document-parent">Document parent</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="calc.html#activate">Activate</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="writer.html">Writer</a><ul>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -163,26 +163,49 @@ Move
|
|||
|
||||
* Move to position.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
sheet = doc[0]
|
||||
doc.move(sheet, 2)
|
||||
|
||||
* Move from sheet
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
sheet = app.active_sheet
|
||||
sheet.move()
|
||||
|
||||
* Move to position.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
sheet = app.active_sheet
|
||||
sheet.move(2)
|
||||
|
||||
|
||||
Remove
|
||||
~~~~~~
|
||||
|
||||
* Remove by object
|
||||
* Remove by object.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
sheet = doc[0]
|
||||
doc.remove(sheet)
|
||||
|
||||
* Remove by name
|
||||
* Remove by name.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
doc.remove('One')
|
||||
|
||||
* Remove from sheet.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
sheet = app.active_sheet
|
||||
sheet.remove()
|
||||
|
||||
|
||||
Copy
|
||||
~~~~
|
||||
|
@ -202,6 +225,13 @@ Copy
|
|||
|
||||
doc.copy('Sheet1', 'Sheet2')
|
||||
|
||||
* From sheet
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
sheet = app.active_sheet
|
||||
sheet.copy(sheet.name + '_2')
|
||||
|
||||
|
||||
Copy from
|
||||
~~~~~~~~~
|
||||
|
@ -217,6 +247,27 @@ Copy from
|
|||
position = 0
|
||||
doc.copy_from(doc_source, name_source, name_target, position)
|
||||
|
||||
|
||||
Copy to
|
||||
~~~~~~~
|
||||
|
||||
* Copy from sheet with the same name
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
doc = app.docs.new()
|
||||
sheet = app.active_sheet
|
||||
sheet.copy_to(doc)
|
||||
|
||||
* Used new name
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
doc = app.docs.new()
|
||||
sheet = app.active_sheet
|
||||
sheet.copy_to(doc, 'NewName')
|
||||
|
||||
|
||||
Sort
|
||||
~~~~
|
||||
|
||||
|
@ -266,3 +317,82 @@ Visible
|
|||
app.msgbox(sheet.visible)
|
||||
sheet.visible = not sheet.visible
|
||||
|
||||
|
||||
Is protected
|
||||
~~~~~~~~~~~~
|
||||
|
||||
* If sheet is protected with password.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
sheet = app.active_sheet
|
||||
app.msgbox(sheet.is_protected)
|
||||
|
||||
|
||||
Set password
|
||||
~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
sheet = app.active_sheet
|
||||
sheet.password = 'letmein'
|
||||
app.msgbox(sheet.is_protected)
|
||||
|
||||
|
||||
Remove password
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
sheet = app.active_sheet
|
||||
sheet.password = 'letmein'
|
||||
app.msgbox(sheet.is_protected)
|
||||
|
||||
sheet.unprotect('letmein')
|
||||
app.msgbox(sheet.is_protected)
|
||||
|
||||
|
||||
Tab color
|
||||
~~~~~~~~~
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
sheet = app.active_sheet
|
||||
app.msgbox(sheet.color)
|
||||
|
||||
sheet.color = 'red'
|
||||
app.msgbox(sheet.color)
|
||||
|
||||
# RGB
|
||||
sheet.color = (125, 200, 10)
|
||||
app.msgbox(sheet.color)
|
||||
|
||||
|
||||
Document parent
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
doc = sheet.doc
|
||||
|
||||
|
||||
Activate
|
||||
~~~~~~~~
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
doc = app.active
|
||||
# Get last sheet
|
||||
sheet = doc[-1]
|
||||
|
||||
# Activate from doc
|
||||
doc.activate(sheet)
|
||||
|
||||
# Activate from sheet
|
||||
sheet.activate()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -2294,6 +2294,7 @@ class LOCalcSheet(object):
|
|||
self.doc.activate(self.obj)
|
||||
return
|
||||
|
||||
# ~ ???
|
||||
def clean(self):
|
||||
doc = self.doc
|
||||
sheet = doc.create_instance('com.sun.star.sheet.Spreadsheet')
|
||||
|
@ -2322,12 +2323,10 @@ class LOCalcSheet(object):
|
|||
index = pos
|
||||
if pos < 0:
|
||||
index = len(doc)
|
||||
name = self.name
|
||||
if not target:
|
||||
new_name = name
|
||||
|
||||
doc._sheets.importSheet(self.doc.obj, name, index)
|
||||
sheet = doc[name]
|
||||
new_name = target or self.name
|
||||
new_pos = doc._sheets.importSheet(self.doc.obj, self.name, index)
|
||||
sheet = doc[new_pos]
|
||||
sheet.name = new_name
|
||||
return sheet
|
||||
|
||||
|
|
Loading…
Reference in New Issue