Documentation
¶
Index ¶
- type Info
- type Option
- func Display(display string) Option
- func Styles(s interface{}) Option
- func ToBookmark(location string) Option
- func ToFile(fileName string) Option
- func ToMail(address, subject string) Option
- func ToRef(ref types.Ref, sheetName string) Option
- func ToTarget(target string) Option
- func ToUrl(address string) Option
- func Tooltip(tip string) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Info ¶
type Info struct {
// contains filtered or unexported fields
}
Info hold advanced settings of hyperlink
type Option ¶
type Option func(o *Info)
Option is helper type to set options for hyperlink
func Styles ¶
func Styles(s interface{}) Option
Styles sets style format to requested DirectStyleID or styles.Info
func ToBookmark ¶
ToBookmark sets target to bookmark, that can be named region in xlsx, bookmark of remote file or even site
func ToRef ¶
ToRef sets target to ref of sheet with sheetName. Omit sheetName to set location to ref of active sheet
func ToTarget ¶
ToTarget is very close to HYPERLINK function of Excel
https://support.office.com/en-us/article/hyperlink-function-333c7ce6-c5ae-4164-9c47-7de9b76f577f a) to target: "target" or "[target]" b) to location at target: "[target]location" or "target#location"
Here are some examples of supported values:
same file, same sheet =HYPERLINK("#A1", "Reference to same sheet")
same file, other sheet =HYPERLINK("#SheetName!A1", "Reference to sheet without space in name") =HYPERLINK("#'Sheet Name'!A1", "Reference to sheet with space in name")
other local file =HYPERLINK("D:\Folder\File.docx","Word file") =HYPERLINK("D:\Folder\File.docx#Bookmark","Local Word file with bookmark") =HYPERLINK("D:\Folder\File.xlsx#SheetName!A1","Local Excel file with reference") =HYPERLINK("D:\Folder\File.xlsx#'Sheet Name'!A1","Local Excel file with reference")
=HYPERLINK("[D:\Folder\File.docx]","Word file") =HYPERLINK("[D:\Folder\File.docx]Bookmark","Local Word file with bookmark") =HYPERLINK("[D:\Folder\File.xlsx]SheetName!A1","Local Excel file with reference") =HYPERLINK("[D:\Folder\File.xlsx]'Sheet Name'!A1","Local Excel file with reference")
other remote file =HYPERLINK("\\SERVER\Folder\File.doc", "Remote Word file") =HYPERLINK("\\SERVER\Folder\File.xlsx#SheetName!A1", "Remote Excel file with reference") =HYPERLINK("\\SERVER\Folder\File.xlsx#'Sheet Name'!A1", "Remote Excel file with reference") =HYPERLINK("[\\SERVER\Folder\File.xlsx]SheetName!A1", "Remote Excel file with reference") =HYPERLINK("[\\SERVER\Folder\File.xlsx]'Sheet Name'!A1", "Remote Excel file with reference")
url =HYPERLINK("https://www.spam.it","Website without bookmark") =HYPERLINK("https://www.spam.it/#bookmark","Website with bookmark") =HYPERLINK("[https://www.spam.it/]bookmark","Website with bookmark")
-email =HYPERLINK("mailto:spam@spam.it","Email without subject") =HYPERLINK("mailto:spam@spam.it?subject=topic","Email with subject")