summaryrefslogtreecommitdiff
path: root/sheetview.go
diff options
context:
space:
mode:
authorDavid <JDavidVR@hotmail.com>2022-02-04 01:45:42 -0400
committerGitHub <noreply@github.com>2022-02-04 13:45:42 +0800
commit862dc9dc1324e11a517b03267d07dd95051d5e6e (patch)
tree94afd2f2b9baa184cb149a04f2eb887069e0d7c9 /sheetview.go
parent156bf6d16ecbd5257d81e781138eaaaf357ffbec (diff)
Support workbook views settings (#1136)
Diffstat (limited to 'sheetview.go')
-rw-r--r--sheetview.go14
1 files changed, 13 insertions, 1 deletions
diff --git a/sheetview.go b/sheetview.go
index 7184a7a..0fb955d 100644
--- a/sheetview.go
+++ b/sheetview.go
@@ -58,7 +58,11 @@ type (
// When using a formula to reference another cell which is empty, the referenced value becomes 0
// when the flag is true. (Default setting is true.)
ShowZeros bool
-
+ // View is a SheetViewOption. It specifies a flag indicating
+ // how sheet is displayed, by default it uses empty string
+ // available options: pageLayout, pageBreakPreview
+ View string
+
/* TODO
// ShowWhiteSpace is a SheetViewOption. It specifies a flag indicating
// whether page layout view shall display margins. False means do not display
@@ -80,6 +84,14 @@ func (o *TopLeftCell) getSheetViewOption(view *xlsxSheetView) {
*o = TopLeftCell(string(view.TopLeftCell))
}
+func (o View) setSheetViewOption(view *xlsxSheetView) {
+ view.View = string(o)
+}
+
+func (o *View) getSheetViewOption(view *xlsxSheetView) {
+ *o = View(string(view.View))
+}
+
func (o DefaultGridColor) setSheetViewOption(view *xlsxSheetView) {
view.DefaultGridColor = boolPtr(bool(o))
}