Skip to content

Commit

Permalink
Add a new function SetColStyle for streaming writer in ar version docs
Browse files Browse the repository at this point in the history
- Add a new exported error variable ErrStreamSetColStyle
  • Loading branch information
xuri authored Jan 30, 2025
1 parent e3773ea commit dea2c60
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 3 deletions.
1 change: 1 addition & 0 deletions ar/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@
* [إدراج فاصل صفحة للدفق](stream.md#InsertPageBreak)
* [تعيين جزء النافذة للدفق](stream.md#SetPanes)
* [دمج الخلية للدفق](stream.md#MergeCell)
* [تعيين نمط العمود في الدفق](stream.md#SetColStyle)
* [تعيين عرض العمود في الدفق](stream.md#SetColWidth)
* [تدفق الدفق](stream.md#Flush)
* [البيانات](data.md)
Expand Down
12 changes: 12 additions & 0 deletions ar/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,18 @@ func (sw *StreamWriter) MergeCell(topLeftCell, bottomRightCell string) error

يوفر MergeCell وظيفة لدمج الخلايا بواسطة منطقة إحداثيات معينة لـ StreamWriter. لا تقم بإنشاء خلية مدمجة تتداخل مع خلية مدمجة أخرى موجودة.

## تعيين نمط العمود في الدفق {#SetColStyle}

```go
func (sw *StreamWriter) SetColStyle(minVal, maxVal, styleID int) error
```

توفر SetColStyle دالة لتعيين نمط عمود واحد أو أعمدة متعددة لـ `StreamWriter`. لاحظ أنه يجب عليك استدعاء الدالة `SetColStyle` قبل الدالة [`SetRow`](stream.md#SetRow). على سبيل المثال، قم بتعيين نمط العمود `H`:

```go
err := sw.SetColStyle(8, 8, style)
```

## تعيين عرض العمود في الدفق {#SetColWidth}

```go
Expand Down
2 changes: 2 additions & 0 deletions ar/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ var (
ErrSparklineStyle = errors.New("parameter 'Style' must between 0-35")
// حدد ErrSparklineType رسالة الخطأ عند تلقي معلمات نوع خط المؤشر غير الصالحة.
ErrSparklineType = errors.New("parameter 'Type' must be 'line', 'column' or 'win_loss'")
// قام ErrStreamSetColStyle بتعريف رسالة الخطأ عند تعيين نمط العمود في وضع الكتابة المتدفقة.
ErrStreamSetColStyle = errors.New("must call the SetColStyle function before the SetRow function")
// حدد ErrStreamSetColWidth رسالة الخطأ على عرض العمود المحدد في وضع كتابة الدفق.
ErrStreamSetColWidth = errors.New("must call the SetColWidth function before the SetRow function")
// حدد ErrStreamSetPanes رسالة الخطأ في الأجزاء المحددة في وضع كتابة الدفق.
Expand Down
2 changes: 1 addition & 1 deletion en/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ MergeCell provides a function to merge cells by a given range reference for the
func (sw *StreamWriter) SetColStyle(minVal, maxVal, styleID int) error
```
SetColStyle provides a function to set the style of a single column or multiple columns for the StreamWriter. Note that you must call the `SetColStyle` function before the [`SetRow`](stream.md#SetRow) function. For example set style of column `H` on `Sheet1`:
SetColStyle provides a function to set the style of a single column or multiple columns for the `StreamWriter`. Note that you must call the `SetColStyle` function before the [`SetRow`](stream.md#SetRow) function. For example set style of column `H`:
```go
err := sw.SetColStyle(8, 8, style)
Expand Down
4 changes: 2 additions & 2 deletions en/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ var (
ErrSparklineStyle = errors.New("parameter 'Style' must between 0-35")
// ErrSparklineType defined the error message on receive the invalid sparkline Type parameters.
ErrSparklineType = errors.New("parameter 'Type' must be 'line', 'column' or 'win_loss'")
// ErrStreamSetColStyle defined the error message on set column style in stream writing mode.
ErrStreamSetColStyle = errors.New("must call the SetColStyle function before the SetRow function")
// قام ErrStreamSetColStyle بتعريف رسالة الخطأ عند تعيين نمط العمود في وضع الكتابة المتدفقة.
ErrStreamSetColStyle = errors.New("must call the SetColStyle function before the SetRow function")
// ErrStreamSetColWidth defined the error message on set column width in stream writing mode.
ErrStreamSetColWidth = errors.New("must call the SetColWidth function before the SetRow function")
// ErrStreamSetPanes defined the error message on set panes in stream writing mode.
Expand Down

0 comments on commit dea2c60

Please sign in to comment.