获取工作簿属性
func (f *File) GetWorkbookPrOptions(opts ...WorkbookPrOptionPtr) error
GetWorkbookPrOptions 用于获取工作簿属性。可选参数:
参数 | 数据类型 |
---|---|
Date1904 | bool |
FilterPrivacy | bool |
CodeName | string |
- 例如,获取工作簿属性:
f := excelize.NewFile()
var (
date1904 excelize.Date1904
filterPrivacy excelize.FilterPrivacy
codeName excelize.CodeName
)
if err := f.GetWorkbookPrOptions(&date1904); err != nil {
fmt.Println(err)
}
if err := f.GetWorkbookPrOptions(&filterPrivacy); err != nil {
fmt.Println(err)
}
if err := f.GetWorkbookPrOptions(&codeName); err != nil {
fmt.Println(err)
}
fmt.Println("Defaults:")
fmt.Printf("- date1904: %t\n", date1904)
fmt.Printf("- filterPrivacy: %t\n", filterPrivacy)
fmt.Printf("- codeName: %q\n", codeName)
得到输出:
Defaults:
- filterPrivacy: true
- codeName: ""