那就用最先回复的帖子里关于后者情况的实现方案吧!代码如下:
- function checkCommentCellValue(sheet) {
- var rowCount = sheet.getRowCount();
- var colCount = sheet.getColumnCount();
- var comments = sheet.comments;
- for (var i = 0; i < rowCount; i++) {
- for (var j = 0; j < colCount; j++) {
- if (comments.get(i, j)) {
- var cellVal = sheet.getValue(i, j);
- console.log(cellVal);
- }
- }
- }
- }
复制代码
楼主试下看是否符合需求。 |