diff options
author | xuri <xuri.me@gmail.com> | 2018-05-07 16:42:30 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-07 16:42:30 +0800 |
commit | d04be7b33da84a3f2f768ee4f0de7c49ab69279e (patch) | |
tree | a4c441c4e2b7f3cdb3d34dcc80ae8e2011736b3b /sheetview.go | |
parent | 38ad20efc11c1872c4e62a12617f0300c138b867 (diff) | |
parent | 3ca180f09c4a602068d890bd22e83ac48a83f5cf (diff) |
Merge branch 'master' into lunny/refactor
Diffstat (limited to 'sheetview.go')
-rw-r--r-- | sheetview.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sheetview.go b/sheetview.go index f05e751..679e915 100644 --- a/sheetview.go +++ b/sheetview.go @@ -24,6 +24,8 @@ type ( ShowGridLines bool // ShowRowColHeaders is a SheetViewOption. ShowRowColHeaders bool + // ZoomScale is a SheetViewOption. + ZoomScale float64 /* TODO // ShowWhiteSpace is a SheetViewOption. ShowWhiteSpace bool @@ -76,6 +78,17 @@ func (o *ShowRowColHeaders) getSheetViewOption(view *xlsxSheetView) { *o = ShowRowColHeaders(defaultTrue(view.ShowRowColHeaders)) // Excel default: true } +func (o ZoomScale) setSheetViewOption(view *xlsxSheetView) { + //This attribute is restricted to values ranging from 10 to 400. + if float64(o) >= 10 && float64(o) <= 400 { + view.ZoomScale = float64(o) + } +} + +func (o *ZoomScale) getSheetViewOption(view *xlsxSheetView) { + *o = ZoomScale(view.ZoomScale) +} + // getSheetView returns the SheetView object func (f *File) getSheetView(sheetName string, viewIndex int) (*xlsxSheetView, error) { xlsx := f.workSheetReader(sheetName) |