summaryrefslogtreecommitdiff
path: root/sheetview.go
diff options
context:
space:
mode:
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))
}