File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1733,7 +1733,6 @@ func (f *File) GetPageLayout(sheet string) (PageLayoutOptions, error) {
17331733// Name: "Amount",
17341734// RefersTo: "Sheet1!$A$2:$D$5",
17351735// Comment: "defined name comment",
1736- // Scope: "Sheet2",
17371736// })
17381737//
17391738// If you fill the RefersTo property with only one columns range without a
@@ -1753,6 +1752,14 @@ func (f *File) GetPageLayout(sheet string) (PageLayoutOptions, error) {
17531752// RefersTo: "Sheet1!$1:$1",
17541753// Scope: "Sheet1",
17551754// })
1755+ //
1756+ // You can also use the function in RefersTo. For example:
1757+ //
1758+ // err := f.SetDefinedName(&excelize.DefinedName{
1759+ // Name: "CustomRange",
1760+ // RefersTo: "Sheet1!$A$2+Sheet1!$D$5",
1761+ // Scope: "Sheet1",
1762+ // })
17561763func (f * File ) SetDefinedName (definedName * DefinedName ) error {
17571764 if definedName .Name == "" || definedName .RefersTo == "" {
17581765 return ErrParameterInvalid
You can’t perform that action at this time.
0 commit comments