summaryrefslogtreecommitdiff
path: root/stream.go
diff options
context:
space:
mode:
Diffstat (limited to 'stream.go')
-rw-r--r--stream.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/stream.go b/stream.go
index 641340e..0db2438 100644
--- a/stream.go
+++ b/stream.go
@@ -387,10 +387,7 @@ func (sw *StreamWriter) SetColWidth(min, max int, width float64) error {
if sw.sheetWritten {
return ErrStreamSetColWidth
}
- if min > TotalColumns || max > TotalColumns {
- return ErrColumnNumber
- }
- if min < 1 || max < 1 {
+ if min < MinColumns || min > MaxColumns || max < MinColumns || max > MaxColumns {
return ErrColumnNumber
}
if width > MaxColumnWidth {