自动调整电子表格列 [英] Autosize Spreadsheet Columns

查看:90
本文介绍了自动调整电子表格列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有在文档中看到任何让我觉得这是受支持的功能的东西.我正在写几张纸,从视觉上看,如果不突出显示所有列并用鼠标自动调整大小,就很难看到所有数据.我宁愿不必在每次运行脚本时都这样做.

I didn't see anything in the documentation that would make me think this is a supported function. I'm writing to several sheets and visually it's difficult to see all the data without highlighting all the columns and autosizing with my mouse. I'd rather not have to do that everytime I run my script.

是否可以通过应用脚本以编程方式执行此操作?我看到了setColumnWidth的选项,但是当文本在各列之间可能有所不同时,我怎么知道如何设置列的宽度.

Is there a way to do this programmatically with app scripts? I saw the option to setColumnWidth, but how do I know how wide to set my columns when my text could vary from column to column.

==感谢您的帮助.

推荐答案

autoResizeColumn(columnPosition)

有关更多详细信息,请参见 API

See the API for more details

这篇关于自动调整电子表格列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆