• O
    Add SetSheetViewOptions and GetSheetViewOptions (#145) · 88e48e07
    Olivier Mengué 提交于
    Two new methods:
    - SetSheetViewOptions(sheetName string, viewIndex int, opts ...SheetViewOption) error
    - GetSheetViewOptions(sheetName string, viewIndex int, opts ...SheetViewOptionPtr) error
    
    The option values are given by the user through types that have privates methods
    that implement the private SheetViewOption and SheetViewOptionPtr interfaces:
    - DefaultGridColor(bool)
    - RightToLeft(bool)
    - ShowFormulas(bool)
    - ShowGridLines(bool)
    - ShowRowColHeaders(bool)
    
    Examples:
        err := xl.SetSheetViewOptions("Sheet1", -1, excelize.ShowGridLines(true))
    
        var showGridLines excelize.ShowGridLines
        err := xl.GetSheetViewOptions("Sheet1", -1, &showGridLines)
    
    Fixes #145.
    88e48e07
xmlWorksheet.go 26.5 KB