|
238 | 238 | <li class="toctree-l4"><a class="reference internal" href="#O365.excel.WorkSheet.__init__"><code class="docutils literal notranslate"><span class="pre">WorkSheet.__init__()</span></code></a></li> |
239 | 239 | <li class="toctree-l4"><a class="reference internal" href="#O365.excel.WorkSheet.add_named_range"><code class="docutils literal notranslate"><span class="pre">WorkSheet.add_named_range()</span></code></a></li> |
240 | 240 | <li class="toctree-l4"><a class="reference internal" href="#O365.excel.WorkSheet.add_table"><code class="docutils literal notranslate"><span class="pre">WorkSheet.add_table()</span></code></a></li> |
| 241 | +<li class="toctree-l4"><a class="reference internal" href="#O365.excel.WorkSheet.append_rows"><code class="docutils literal notranslate"><span class="pre">WorkSheet.append_rows()</span></code></a></li> |
241 | 242 | <li class="toctree-l4"><a class="reference internal" href="#O365.excel.WorkSheet.delete"><code class="docutils literal notranslate"><span class="pre">WorkSheet.delete()</span></code></a></li> |
242 | 243 | <li class="toctree-l4"><a class="reference internal" href="#O365.excel.WorkSheet.get_cell"><code class="docutils literal notranslate"><span class="pre">WorkSheet.get_cell()</span></code></a></li> |
243 | 244 | <li class="toctree-l4"><a class="reference internal" href="#O365.excel.WorkSheet.get_named_range"><code class="docutils literal notranslate"><span class="pre">WorkSheet.get_named_range()</span></code></a></li> |
|
251 | 252 | <li class="toctree-l4"><a class="reference internal" href="#O365.excel.WorkSheet.remove_sheet_name_from_address"><code class="docutils literal notranslate"><span class="pre">WorkSheet.remove_sheet_name_from_address()</span></code></a></li> |
252 | 253 | <li class="toctree-l4"><a class="reference internal" href="#O365.excel.WorkSheet.session"><code class="docutils literal notranslate"><span class="pre">WorkSheet.session</span></code></a></li> |
253 | 254 | <li class="toctree-l4"><a class="reference internal" href="#O365.excel.WorkSheet.update"><code class="docutils literal notranslate"><span class="pre">WorkSheet.update()</span></code></a></li> |
| 255 | +<li class="toctree-l4"><a class="reference internal" href="#O365.excel.WorkSheet.update_cells"><code class="docutils literal notranslate"><span class="pre">WorkSheet.update_cells()</span></code></a></li> |
254 | 256 | <li class="toctree-l4"><a class="reference internal" href="#O365.excel.WorkSheet.visibility"><code class="docutils literal notranslate"><span class="pre">WorkSheet.visibility</span></code></a></li> |
255 | 257 | <li class="toctree-l4"><a class="reference internal" href="#O365.excel.WorkSheet.workbook"><code class="docutils literal notranslate"><span class="pre">WorkSheet.workbook</span></code></a></li> |
256 | 258 | </ul> |
@@ -1831,6 +1833,27 @@ <h1>Excel<a class="headerlink" href="#excel" title="Link to this heading"></a |
1831 | 1833 | :return: a Table instance</p> |
1832 | 1834 | </dd></dl> |
1833 | 1835 |
|
| 1836 | +<dl class="py method"> |
| 1837 | +<dt class="sig sig-object py" id="O365.excel.WorkSheet.append_rows"> |
| 1838 | +<span class="sig-name descname"><span class="pre">append_rows</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">rows</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/excel.html#WorkSheet.append_rows"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#O365.excel.WorkSheet.append_rows" title="Link to this definition"></a></dt> |
| 1839 | +<dd><p>Appends rows to the end of a worksheet. There is no direct Graph API to do this operation without a Table |
| 1840 | +instance. Instead, this method identifies the last row in the worksheet and requests a range after that row |
| 1841 | +and updates that range.</p> |
| 1842 | +<p>Beware! If you open your workbook from sharepoint and delete all of the rows in one go and attempt to append |
| 1843 | +new rows, you will get undefined behavior from the Microsoft Graph API. I don’t know if I did not give enough |
| 1844 | +time for the backend to synchronize from the moment of deletion on my browser and the moment I triggered my |
| 1845 | +script, but this is something I have observed. Sometimes insertion fails and sometimes it inserts where the new |
| 1846 | +row would have been if data had not been deleted from the browser side. Maybe it is an API cache issue. However, |
| 1847 | +after the first row is inserted successfully, this undefined behavior goes away on repeat calls to my scripts. |
| 1848 | +Documenting this behavior for future consumers of this API.</p> |
| 1849 | +<dl class="field-list simple"> |
| 1850 | +<dt class="field-odd">Parameters<span class="colon">:</span></dt> |
| 1851 | +<dd class="field-odd"><p><strong>rows</strong> (<em>list</em><em>[</em><em>list</em><em>[</em><em>str</em><em>]</em><em>]</em>) – list of rows to push to this range. If updating a single cell, pass a list |
| 1852 | +containing a single row (list) containing a single cell worth of data.</p> |
| 1853 | +</dd> |
| 1854 | +</dl> |
| 1855 | +</dd></dl> |
| 1856 | + |
1834 | 1857 | <dl class="py method"> |
1835 | 1858 | <dt class="sig sig-object py" id="O365.excel.WorkSheet.delete"> |
1836 | 1859 | <span class="sig-name descname"><span class="pre">delete</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/excel.html#WorkSheet.delete"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#O365.excel.WorkSheet.delete" title="Link to this definition"></a></dt> |
@@ -1923,6 +1946,18 @@ <h1>Excel<a class="headerlink" href="#excel" title="Link to this heading"></a |
1923 | 1946 | <dd><p>Changes the name, position or visibility of this worksheet</p> |
1924 | 1947 | </dd></dl> |
1925 | 1948 |
|
| 1949 | +<dl class="py method"> |
| 1950 | +<dt class="sig sig-object py" id="O365.excel.WorkSheet.update_cells"> |
| 1951 | +<span class="sig-name descname"><span class="pre">update_cells</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">address</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rows</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/O365/excel.html#WorkSheet.update_cells"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#O365.excel.WorkSheet.update_cells" title="Link to this definition"></a></dt> |
| 1952 | +<dd><p>Updates the cells at a given range in this worksheet. This is a convenience method since there is no |
| 1953 | +direct endpoint API for tableless row updates. |
| 1954 | +:param str|Range address: the address to resolve to a range which can be used for updating cells. |
| 1955 | +:param list[list[str]] rows: list of rows to push to this range. If updating a single cell, pass a list</p> |
| 1956 | +<blockquote> |
| 1957 | +<div><p>containing a single row (list) containing a single cell worth of data.</p> |
| 1958 | +</div></blockquote> |
| 1959 | +</dd></dl> |
| 1960 | + |
1926 | 1961 | <dl class="py attribute"> |
1927 | 1962 | <dt class="sig sig-object py" id="O365.excel.WorkSheet.visibility"> |
1928 | 1963 | <span class="sig-name descname"><span class="pre">visibility</span></span><a class="headerlink" href="#O365.excel.WorkSheet.visibility" title="Link to this definition"></a></dt> |
|
0 commit comments