This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function main(workbook: ExcelScript.Workbook) { | |
| // ブック内の全シートをループ | |
| let worksheets = workbook.getWorksheets(); | |
| worksheets.forEach(sh => { | |
| try { | |
| let comments = sh.getComments(); | |
| // コメント出力用シート 同名シートがすでにあれば削除 | |
| let shexName = sh.getName() + "_comments"; | |
| let existingSheet = workbook.getWorksheet(shexName); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Option Explicit | |
| Sub ExtractMemos() | |
| Dim cmt As Comments | |
| Dim c As Comment | |
| Dim rp As Comment | |
| Dim sh As Worksheet | |
| Dim shex As Worksheet | |
| Dim exLine As Long | |
| ' cmt Comment[s]型 シート内のすべてのメモをコレクションとして格納 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Option Explicit | |
| Sub ExtractComments() | |
| Dim cmt As CommentsThreaded | |
| Dim c As CommentThreaded | |
| Dim rp As CommentThreaded | |
| Dim sh As Worksheet | |
| Dim shex As Worksheet | |
| Dim exLine As Long | |
| ' cmt Comment[s]Threaded型 シート内のすべてのコメントをコレクションとして格納 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Option Explicit | |
| Sub ExtractComments() | |
| Dim cmt As CommentsThreaded | |
| Dim c As CommentThreaded | |
| Dim rp As CommentThreaded | |
| Dim sh As Worksheet | |
| Dim shex As Worksheet | |
| Dim exLine As Long | |
| ' cmt Comment[s]Threaded型 シート内のすべてのコメントをコレクションとして格納 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| EPIDWEEKTODATE=LAMBDA(Yr, EpidWk, | |
| LET( | |
| start, DATE(Yr, 1, 1), | |
| dow, WEEKDAY(start, 12), | |
| flag, IF(dow >= 4, 0, -1), | |
| weekstart, start - dow, | |
| weekstart + (EpidWk + flag) * 7 | |
| ) | |
| ); | |
| EPIDDATETOWEEK = LAMBDA(Dt, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| AVE7DAYS = LAMBDA(range, | |
| iferror(average(offset(range,-6,0,7,1)),"") | |
| ); | |
| ROC7DAYS = LAMBDA(range,ifzero, | |
| if(row(range)>14,iferror( | |
| if(sum(offset(range,-6,0,7,1))/sum(offset(range,-13,0,7,1))<>0, | |
| sum(offset(range,-6,0,7,1))/sum(offset(range,-13,0,7,1)),ifzero), | |
| ifzero),"") | |
| ) | |
| ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| REVTEXT = LAMBDA(x,[y], | |
| if(x<>"", | |
| if(isomitted(y), | |
| concat(right(x,1) , REVTEXT(LEFT(x,len(x)-1),len(x)-1)), | |
| concat(right(x,1) , REVTEXT(LEFT(x,len(x)-1),y-1)) | |
| ), | |
| "" | |
| ) | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NUMERALJP = LAMBDA(x, | |
| if(x<>0, | |
| concat( | |
| if(x/10000/10000/10000>1,concat(int(x/10000/10000/10000),"兆"),""), | |
| if(mod(x,10000*10000*10000)/10000/10000>1, | |
| concat(int(mod(x,10000*10000*10000)/10000/10000),"億"),""), | |
| if(mod(x,10000*10000)/10000>1, | |
| concat(int(mod(x,10000*10000)/10000),"万"),""), | |
| if(mod(x,10000)>0, | |
| mod(x,10000),"") |