获取范围列数
<h1>功能</h1>
<p>获取Excel工作表指定范围内的有效列数。</p>
<h1><strong>选项</strong></h1>
<table>
<thead>
<tr>
<th>名称</th>
<th>说明</th>
<th>示例</th>
</tr>
</thead>
<tbody>
<tr>
<td>工作表名称</td>
<td>【字符串】要获取的范围所在工作表的名称</td>
<td>'Sheet1'</td>
</tr>
<tr>
<td>范围</td>
<td>【字符串】要获取行数的范围,若为空(''),则取整个工作表的有效范围</td>
<td>'A1:R10'</td>
</tr>
</tbody>
</table>
<h1><strong>输出</strong></h1>
<table>
<thead>
<tr>
<th>名称</th>
<th>说明</th>
<th>示例</th>
</tr>
</thead>
<tbody>
<tr>
<td>列数</td>
<td>【整数】获取到的列数,创建整数变量</td>
<td>{填入变量名称}</td>
</tr>
</tbody>
</table>
<h1><strong>注意/说明</strong></h1>
<p>1、使用该函数,需要和‘Excel应用程序范围’函数搭配。
2、使用该函数时,需要确保要操作的excel文件是处于关闭状态。
3、如果‘范围’为空(''),则取到的是excel工作表中的usedRange。
4、在‘范围’为空('')的前提下,如果删除工作表中的列,获取的列数就是1;如果删除工作表中原有的内容,则获取的行数就是原本有内容的列数。</p>
<h1>相关函数</h1>
<p>无</p>
<h1><strong>示例/演示</strong></h1>
<p><img src="https://www.showdoc.com.cn/server/api/attachment/visitfile/sign/52513b509932397769639d81c6805551" alt="" /></p>
<h1>示例附件</h1>
<p><a href="https://www.showdoc.com.cn/server/api/attachment/visitfile/sign/ca67d800c4cd0a8525325ae39ef2bdcf" title="[组件[获取范围列数]_20210207.db">组件[获取范围列数]_20210207.db</a></p>