()
| 7 | ) |
| 8 | |
| 9 | func 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 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…