Last active
January 17, 2026 07:48
-
-
Save AJABON/96b2fe4e24ee6defc0b28120400cf040 to your computer and use it in GitHub Desktop.
セルの値を取得してそのセル内に棒グラフっぽく段落境界線を引くやつ
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
| // くわしくは以下で | |
| // https://ajabon.catfood.jp/?p=2888 | |
| var sel = app.selection[0].cells; | |
| for (var i = 0; i < sel.length; i++) { | |
| var cellWidth = sel[i].width; | |
| var val = sel[i].texts[0].contents.match(/^\d+[\d\.]*$/) == null? 0 : eval(sel[i].contents); | |
| var barDistance = cellWidth - cellWidth / 100 * val; | |
| sel[i].paragraphs[0].ruleAboveRightIndent = barDistance; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment