Is it possible to capture the selected portion of text within a Spreadsheet cell with Google Apps Script?

偶尔善良 提交于 2021-02-19 07:08:58

问题


Is it possible to get the selected text in a cell as shown below. I think the answer is no and I can't find any commands related to selections of this type in Google Apps Script for spreadsheets.

We can select ranges of cells but I can't find any Google Apps Script commands that deal with selections within the cell even though it is possible to make these selections via menu commands and even make changes like text style and text color to partial selections of cell text.

It is interesting to note however that it is possible to capture a partial selection of text in a table cell in Google Docs with Google Apps Script for Google Docs with the following command:

DocumentApp.getActiveDocument().getSelection()

Here's an example of such a selection in the following image.

So I'm just curious if anyone can provide me with a link in the documentation that can shine some light on this question. Thanks

来源:https://stackoverflow.com/questions/45538378/is-it-possible-to-capture-the-selected-portion-of-text-within-a-spreadsheet-cell

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!