diff options
author | Ri Xu <xuri.me@gmail.com> | 2017-06-08 11:11:11 +0800 |
---|---|---|
committer | Ri Xu <xuri.me@gmail.com> | 2017-06-08 11:11:11 +0800 |
commit | c89d84235238f1e2a37b03551ca6ef652c2f3769 (patch) | |
tree | 6ed520a68e78cca3a4bb9b932a5cdbd4c4cc5499 /rows.go | |
parent | c5dc63295186ad35ece6a2c9c940e84665f9f98f (diff) |
Init auto filter support, relate issue #59.
Diffstat (limited to 'rows.go')
-rw-r--r-- | rows.go | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -148,3 +148,27 @@ func (xlsx *xlsxC) getValueFrom(f *File, d *xlsxSST) (string, error) { return f.formattedValue(xlsx.S, xlsx.V), nil } } + +// HideRow provides a function to set hidden of a single row by given worksheet index and row index. For example, hide row 3 in Sheet1: +// +// xlsx.HideRow("Sheet1", 2) +// +func (f *File) HideRow(sheet string, rowIndex int) { + xlsx := f.workSheetReader(sheet) + rows := rowIndex + 1 + cells := 0 + completeRow(xlsx, rows, cells) + xlsx.SheetData.Row[rowIndex].Hidden = true +} + +// UnhideRow provides a function to set unhidden of a single row by given worksheet index and row index. For example, unhide row 3 in Sheet1: +// +// xlsx.UnhideRow("Sheet1", 2) +// +func (f *File) UnhideRow(sheet string, rowIndex int) { + xlsx := f.workSheetReader(sheet) + rows := rowIndex + 1 + cells := 0 + completeRow(xlsx, rows, cells) + xlsx.SheetData.Row[rowIndex].Hidden = false +} |