From 9e64df6a96685afcfbc7295beda38739868a6871 Mon Sep 17 00:00:00 2001 From: xuri Date: Wed, 5 Jan 2022 00:13:29 +0800 Subject: Update create style example, using a pointer of the structure instead of JSON --- cell.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'cell.go') diff --git a/cell.go b/cell.go index 146d0a2..dec743b 100644 --- a/cell.go +++ b/cell.go @@ -666,9 +666,17 @@ type HyperlinkOpts struct { // in this workbook. Maximum limit hyperlinks in a worksheet is 65530. The // below is example for external link. // -// err := f.SetCellHyperLink("Sheet1", "A3", "https://github.com/xuri/excelize", "External") +// if err := f.SetCellHyperLink("Sheet1", "A3", +// "https://github.com/xuri/excelize", "External"); err != nil { +// fmt.Println(err) +// } // // Set underline and font color style for the cell. -// style, err := f.NewStyle(`{"font":{"color":"#1265BE","underline":"single"}}`) +// style, err := f.NewStyle(&excelize.Style{ +// Font: &excelize.Font{Color: "#1265BE", Underline: "single"}, +// }) +// if err != nil { +// fmt.Println(err) +// } // err = f.SetCellStyle("Sheet1", "A3", "A3", style) // // A this is another example for "Location": -- cgit v1.2.1