[英]How to get font size to show up in a cell in Google Sheets
i've been looking everywhere for solution.我一直在到处寻找解决方案。
I want to create an app script on Google Sheets that creates a custom formula to show what font size text a cell contains.我想在 Google 表格上创建一个应用脚本,该脚本创建一个自定义公式来显示单元格包含的字体大小文本。
I found Google has a function " getFontSize ", but no luck in getting it to work:我发现谷歌有一个 function “ getFontSize ”,但没有让它工作:
function FONTSIZE(range) { return getFontSize(Number) }
Any help would be appreciated as i am a script app noob!任何帮助将不胜感激,因为我是一个脚本应用程序新手!
I believe your goal is as follows.我相信你的目标如下。
In this case, how about the following modification?在这种情况下,如何进行以下修改?
function FONTSIZE(range) {
return SpreadsheetApp.getActiveSheet().getRange(range).getFontSizes();
}
=FONTSIZE("A1")
and =FONTSIZE("A1:C3")
in a cell.在这种情况下,请将自定义 function 像=FONTSIZE("A1")
和=FONTSIZE("A1:C3")
放入单元格中。 By this, the font size of the cell "A1" is returned.这样,就返回了单元格“A1”的字体大小。getFontSize()
and/or getFontSizes()
.如果您想将此与 Google 电子表格一起使用,请使用getFontSize()
和/或getFontSizes()
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.