MCPcopy Create free account
hub / github.com/plandem/xlsx / Example_comments

Function Example_comments

docs/src/code/comments_test.go:9–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7)
8
9func Example_comments() {
10 xl := xlsx.New()
11
12 sheet := xl.AddSheet("")
13
14 //red alert box comment
15 cmt := comment.New(
16 comment.Width(250),
17 comment.Height(50),
18 comment.Background("#FFAAAA"),
19 comment.Shadow("#FF0000"),
20 comment.Stroke("#CC0000"),
21 comment.Author("Gate Keeper"),
22 comment.Text(
23 styles.New(
24 styles.Font.Bold,
25 styles.Font.Size(16),
26 ),
27 "STOP",
28 "\nDanger zone, do not proceed",
29 ),
30 )
31
32 sheet.CellByRef("A2").SetValue("Hello?")
33 sheet.CellByRef("A2").SetComment(cmt)
34
35 xl.SaveAs("./foo.xlsx")
36}

Callers

nothing calls this directly

Calls 15

NewFunction · 0.92
NewFunction · 0.92
WidthFunction · 0.92
HeightFunction · 0.92
BackgroundFunction · 0.92
ShadowFunction · 0.92
StrokeFunction · 0.92
AuthorFunction · 0.92
TextFunction · 0.92
NewFunction · 0.92
AddSheetMethod · 0.80
SizeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…