Skip to content

Commit

Permalink
Update docs for the error message variable
Browse files Browse the repository at this point in the history
  • Loading branch information
xuri committed Jan 9, 2022
1 parent 669549a commit 5825d70
Show file tree
Hide file tree
Showing 64 changed files with 325 additions and 127 deletions.
Binary file removed .DS_Store
Binary file not shown.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules/
_book/
_book/
**/.DS_Store
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 - 2021 Ri Xu All rights reserved.
Copyright (c) 2017 - 2022 Ri Xu All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion ar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Excelize هي مكتبة مكتوبة في الذهاب نقية توفير مج
- go.dev: [pkg.go.dev/github.com/xuri/excelize/v2](https://pkg.go.dev/github.com/xuri/excelize/v2)
- التراخيص: [BSD 3-Clause](https://opensource.org/licenses/BSD-3-Clause)
- الإصدار الأخير: [v2.5.0](https://github.com/xuri/excelize/releases/latest)
- وقت تحديث المستند: كانون الثاني 8, 2022
- وقت تحديث المستند: كانون الثاني 10, 2022

## بعثة المشروع

Expand Down
6 changes: 3 additions & 3 deletions ar/cell.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (f *File) SetCellStr(sheet, axis, value string) error
## تعيين نمط الخلية {#SetCellStyle}

```go
func (f *File) SetCellStyle(sheet, hcell, vcell string, styleID int) error
func (f *File) SetCellStyle(sheet, hCell, vCell string, styleID int) error
```

يوفر SetCellStyle وظيفة لإضافة سمة نمط للخلايا من خلال اسم ورقة العمل المعطى ومنطقة الإحداثيات ومعرف النمط. يمكن الحصول على فهارس النمط من خلال وظيفة [`NewStyle`](style.md#NewStyle). لاحظ أن حد النوع `diagonalDown` و `diagonalUp` يجب أن يستخدموا نفس اللون في نفس منطقة الإحداثيات. سيقوم SetCellStyle بالكتابة فوق الأنماط الموجودة للخلية ، ولن يقوم بإلحاق أو دمج النمط مع الأنماط الموجودة.
Expand Down Expand Up @@ -480,7 +480,7 @@ func (f *File) GetCellStyle(sheet, axis string) (int, error)
## دمج الخلايا {#MergeCell}

```go
func (f *File) MergeCell(sheet, hcell, vcell string) error
func (f *File) MergeCell(sheet, hCell, vCell string) error
```

دمج الخلايا بناءً على اسم ورقة العمل المحدد (حساس لحالة الأحرف) ومناطق إحداثيات الخلية. يؤدي دمج الخلايا إلى الاحتفاظ فقط بقيمة الخلية العلوية اليسرى ، ويتجاهل القيم الأخرى. على سبيل المثال ، ادمج الخلايا في منطقة `D3:E9` في ورقة عمل تسمى `Sheet1`:
Expand All @@ -494,7 +494,7 @@ err := f.MergeCell("Sheet1", "D3", "E9")
## خلايا إلغاء الدمج {#UnmergeCell}

```go
func (f *File) UnmergeCell(sheet string, hcell, vcell string) error
func (f *File) UnmergeCell(sheet string, hCell, vCell string) error
```

يوفر UnmergeCell وظيفة لإلغاء دمج منطقة إحداثيات معينة. على سبيل المثال ، إلغاء دمج المنطقة `D3:E9` في `Sheet1`:
Expand Down
2 changes: 1 addition & 1 deletion ar/constants.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const (
StrictNameSpaceSpreadSheet = "http://purl.oclc.org/ooxml/spreadsheetml/main"
NameSpaceDublinCore = "http://purl.org/dc/elements/1.1/"
NameSpaceDublinCoreTerms = "http://purl.org/dc/terms/"
NameSpaceDublinCoreMetadataIntiative = "http://purl.org/dc/dcmitype/"
NameSpaceDublinCoreMetadataInitiative = "http://purl.org/dc/dcmitype/"
ContentTypeDrawing = "application/vnd.openxmlformats-officedocument.drawing+xml"
ContentTypeDrawingML = "application/vnd.openxmlformats-officedocument.drawingml.chart+xml"
ContentTypeMacro = "application/vnd.ms-excel.sheet.macroEnabled.main+xml"
Expand Down
4 changes: 2 additions & 2 deletions ar/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (sw *StreamWriter) SetRow(axis string, slice interface{}) error
## إضافة جدول إلى تيار {#AddTable}

```go
func (sw *StreamWriter) AddTable(hcell, vcell, format string) error
func (sw *StreamWriter) AddTable(hCell, vCell, format string) error
```

يقوم AddTable بإنشاء جدول Excel لـ StreamWriter باستخدام منطقة الإحداثيات المحددة ومجموعة التنسيق.
Expand Down Expand Up @@ -128,7 +128,7 @@ err := streamWriter.AddTable("F2", "H6", `{
## دمج الخلية للدفق {#MergeCell}

```go
func (sw *StreamWriter) MergeCell(hcell, vcell string) error
func (sw *StreamWriter) MergeCell(hCell, vCell string) error
```

يوفر MergeCell وظيفة لدمج الخلايا بواسطة منطقة إحداثيات معينة لـ StreamWriter. لا تقم بإنشاء خلية مدمجة تتداخل مع خلية مدمجة أخرى موجودة.
Expand Down
4 changes: 2 additions & 2 deletions ar/utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## الطاولة {#AddTable}

```go
func (f *File) AddTable(sheet, hcell, vcell, format string) error
func (f *File) AddTable(sheet, hCell, vCell, format string) error
```

يوفر AddTable طريقة لإضافة جدول في ورقة عمل حسب اسم ورقة العمل المحدد ومنطقة الإحداثيات ومجموعة التنسيق.
Expand Down Expand Up @@ -70,7 +70,7 @@ TableStyleDark11|<img src="../images/table_style/dark/11.png" width="61">||||
## فلتر السيارات {#AutoFilter}

```go
func (f *File) AutoFilter(sheet, hcell, vcell, format string) error
func (f *File) AutoFilter(sheet, hCell, vCell, format string) error
```

يوفر AutoFilter طريقة لإضافة عامل تصفية تلقائي في ورقة عمل حسب اسم ورقة العمل المحدد ومنطقة الإحداثيات والإعدادات. يعد عامل التصفية التلقائي في Excel طريقة لتصفية نطاق ثنائي الأبعاد من البيانات بناءً على بعض المعايير البسيطة.
Expand Down
18 changes: 18 additions & 0 deletions ar/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ var (
ErrFontSize = errors.New("font size must be between 1 and 409 points")
// حدد ErrSheetIdx رسالة الخطأ عند تلقي فهرس ورقة العمل غير صالح.
ErrSheetIdx = errors.New("invalid worksheet index")
// حدد ErrUnprotectSheet رسالة الخطأ في ورقة العمل ولم تحدد أي حماية.
ErrUnprotectSheet = errors.New("worksheet has set no protect")
// حدد ErrUnprotectSheetPassword رسالة الخطأ على إزالة حماية الورقة مع فشل التحقق من كلمة المرور.
ErrUnprotectSheetPassword = errors.New("worksheet protect password not match")
// حدد ErrGroupSheets رسالة الخطأ في أوراق المجموعة.
ErrGroupSheets = errors.New("group worksheet must contain an active worksheet")
// حدد ErrDataValidationFormulaLength رسالة الخطأ لتلقي طول صيغة التحقق من
Expand All @@ -66,6 +70,20 @@ var (
// حدد ErrOptionsUnzipSizeLimit رسالة الخطأ لتلقي UnzipSizeLimit و
// UnzipXMLSizeLimit غير صالحين.
ErrOptionsUnzipSizeLimit = errors.New("the value of UnzipSizeLimit should be greater than or equal to UnzipXMLSizeLimit")
// حدد ErrSave رسالة الخطأ لحفظ الملف.
ErrSave = errors.New("no path defined for file, consider File.WriteTo or File.Write")
// حدد ErrAttrValBool رسالة الخطأ على سمة XML من النوع المنطقي التنظيمي وغير المنظم.
ErrAttrValBool = errors.New("unexpected child of attrValBool")
// حدد ErrSparklineType رسالة الخطأ عند تلقي معلمات نوع خط المؤشر غير الصالحة.
ErrSparklineType = errors.New("parameter 'Type' must be 'line', 'column' or 'win_loss'")
// حدد ErrSparklineLocation رسالة الخطأ على معلمات 'Location' المفقودة.
ErrSparklineLocation = errors.New("parameter 'Location' is required")
// حدد ErrSparklineRange رسالة الخطأ على معلمات خط المؤشر المفقودة 'Range'.
ErrSparklineRange = errors.New("parameter 'Range' is required")
// حدد ErrSparkline رسالة الخطأ عند تلقي معلمات خط المؤشر غير الصالحة.
ErrSparkline = errors.New("must have the same number of 'Location' and 'Range' parameters")
// حدد ErrSparklineStyle رسالة الخطأ عند تلقي معلمات خط المؤشر غير الصالحة 'Style'.
ErrSparklineStyle = errors.New("parameter 'Style' must between 0-35")
)
```

Expand Down
2 changes: 1 addition & 1 deletion de/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Excelize ist eine Bibliothek, die in reinem Go geschrieben wurde und eine Reihe
- go.dev: [pkg.go.dev/github.com/xuri/excelize/v2](https://pkg.go.dev/github.com/xuri/excelize/v2)
- Lizenzen: [BSD 3-Clause](https://opensource.org/licenses/BSD-3-Clause)
- Letzte Version: [v2.5.0](https://github.com/xuri/excelize/releases/latest)
- Dokument Aktualisierungszeit: Januar 8, 2022
- Dokument Aktualisierungszeit: Januar 10, 2022

## Project mission

Expand Down
6 changes: 3 additions & 3 deletions de/cell.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ SetCellStr bietet eine Funktion zum Festlegen des Zeichenfolgentypwerts einer Ze
## Festlegen des Zellstils {#SetCellStyle}

```go
func (f *File) SetCellStyle(sheet, hcell, vcell string, styleID int) error
func (f *File) SetCellStyle(sheet, hCell, vCell string, styleID int) error
```

SetCellStyle bietet eine Funktion zum Hinzufügen von Stilattributen für Zellen anhand des angegebenen Arbeitsblattnamens, des Koordinatenbereichs und der Stil-ID. Stilindizes können mit der Funktion [`NewStyle`](style.md#NewStyle) abgerufen werden. Beachten Sie, dass die Rahmen vom Typ `diagonalDown` und `diagonalUp` dieselbe Farbe im selben Koordinatenbereich verwenden sollten. SetCellStyle überschreibt die vorhandenen Stile für die Zelle, fügt Stile nicht an oder führt sie mit vorhandenen Stilen zusammen.
Expand Down Expand Up @@ -475,7 +475,7 @@ Der Zellenstilindex wird aus dem angegebenen Arbeitsblattnamen (Groß- und Klein
## Zusammenführen von Zellen {#MergeCell}

```go
func (f *File) MergeCell(sheet, hcell, vcell string) error
func (f *File) MergeCell(sheet, hCell, vCell string) error
```

Führen Sie Zellen basierend auf dem angegebenen Arbeitsblattnamen (Groß- und Kleinschreibung beachten) und den Zellkoordinatenbereichen zusammen. Beim Zusammenführen von Zellen wird nur der obere linke Zellenwert beibehalten und die anderen Werte verworfen. Führen Sie beispielsweise Zellen im Bereich `D3:E9` in einem Arbeitsblatt mit dem Namen `Sheet1` zusammen:
Expand All @@ -489,7 +489,7 @@ Wenn sich der angegebene Zellkoordinatenbereich mit anderen vorhandenen zusammen
## Unmerge-Zellen {#UnmergeCell}

```go
func (f *File) UnmergeCell(sheet string, hcell, vcell string) error
func (f *File) UnmergeCell(sheet string, hCell, vCell string) error
```

UnmergeCell bietet eine Funktion zum Aufheben der Zusammenführung eines bestimmten Koordinatenbereichs. Zum Beispiel den Bereich `D3:E9` auf `Sheet1` entfernen:
Expand Down
2 changes: 1 addition & 1 deletion de/constants.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const (
StrictNameSpaceSpreadSheet = "http://purl.oclc.org/ooxml/spreadsheetml/main"
NameSpaceDublinCore = "http://purl.org/dc/elements/1.1/"
NameSpaceDublinCoreTerms = "http://purl.org/dc/terms/"
NameSpaceDublinCoreMetadataIntiative = "http://purl.org/dc/dcmitype/"
NameSpaceDublinCoreMetadataInitiative = "http://purl.org/dc/dcmitype/"
ContentTypeDrawing = "application/vnd.openxmlformats-officedocument.drawing+xml"
ContentTypeDrawingML = "application/vnd.openxmlformats-officedocument.drawingml.chart+xml"
ContentTypeMacro = "application/vnd.ms-excel.sheet.macroEnabled.main+xml"
Expand Down
4 changes: 2 additions & 2 deletions de/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ SetRow schreibt ein Array in die Stream-Zeile, indem eine Startkoordinate und ei
## Fügen Sie eine Tabelle zum Streamen hinzu {#AddTable}

```go
func (sw *StreamWriter) AddTable(hcell, vcell, format string) error
func (sw *StreamWriter) AddTable(hCell, vCell, format string) error
```

AddTable erstellt eine Excel-Tabelle für den StreamWriter unter Verwendung des angegebenen Koordinatenbereichs und Formatsatzes.
Expand Down Expand Up @@ -128,7 +128,7 @@ Beachten Sie, dass die Tabelle mindestens zwei Zeilen einschließlich der Kopfze
## Zelle zum Streaming zusammenführen {#MergeCell}

```go
func (sw *StreamWriter) MergeCell(hcell, vcell string) error
func (sw *StreamWriter) MergeCell(hCell, vCell string) error
```

MergeCell bietet eine Funktion zum Zusammenführen von Zellen nach einem bestimmten Koordinatenbereich für den StreamWriter. Erstellen Sie keine zusammengeführte Zelle, die sich mit einer anderen vorhandenen zusammengeführten Zelle überschneidet.
Expand Down
4 changes: 2 additions & 2 deletions de/utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Tabelle {#AddTable}

```go
func (f *File) AddTable(sheet, hcell, vcell, format string) error
func (f *File) AddTable(sheet, hCell, vCell, format string) error
```

AddTable bietet die Methode zum Hinzufügen einer Tabelle zu einem Arbeitsblatt anhand des angegebenen Arbeitsblattnamens, des Koordinatenbereichs und des Formatsatzes.
Expand Down Expand Up @@ -70,7 +70,7 @@ TableStyleDark11|<img src="../images/table_style/dark/11.png" width="61">||||
## Automatischer Filter {#AutoFilter}

```go
func (f *File) AutoFilter(sheet, hcell, vcell, format string) error
func (f *File) AutoFilter(sheet, hCell, vCell, format string) error
```

AutoFilter bietet die Methode zum Hinzufügen eines automatischen Filters in einem Arbeitsblatt anhand des angegebenen Arbeitsblattnamens, des Koordinatenbereichs und der Einstellungen. Ein automatischer Filter in Excel ist eine Möglichkeit, einen 2D-Datenbereich anhand einiger einfacher Kriterien zu filtern.
Expand Down
20 changes: 20 additions & 0 deletions de/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ var (
// ErrSheetIdx hat die Fehlermeldung beim Empfang des ungültigen
// Arbeitsblattindex definiert.
ErrSheetIdx = errors.New("invalid worksheet index")
// ErrUnprotectSheet definiert die Fehlermeldung auf dem Arbeitsblatt hat keinen Schutz gesetzt.
ErrUnprotectSheet = errors.New("worksheet has set no protect")
// ErrUnprotectSheetPassword hat die Fehlermeldung beim Entfernen des Blattschutzes mit fehlgeschlagener
// Kennwortüberprüfung definiert.
ErrUnprotectSheetPassword = errors.New("worksheet protect password not match")
// ErrGroupSheets definierte die Fehlermeldung auf Gruppenblättern.
ErrGroupSheets = errors.New("group worksheet must contain an active worksheet")
// ErrDataValidationFormulaLength definiert die Fehlermeldung für den Empfang
Expand All @@ -88,6 +93,21 @@ var (
// ErrOptionsUnzipSizeLimit definierte die Fehlermeldung für den Empfang von
// ungültigem UnzipSizeLimit und UnzipXMLSizeLimit.
ErrOptionsUnzipSizeLimit = errors.New("the value of UnzipSizeLimit should be greater than or equal to UnzipXMLSizeLimit")
// ErrSave definiert die Fehlermeldung zum Speichern der Datei.
ErrSave = errors.New("no path defined for file, consider File.WriteTo or File.Write")
// ErrAttrValBool hat die Fehlermeldung für das XML-Attribut vom Typ Marshall und Unmarshal vom
// Typ Boolean definiert.
ErrAttrValBool = errors.New("unexpected child of attrValBool")
// ErrSparklineType definierte die Fehlermeldung beim Empfang der ungültigen Sparkline-'Type'-Parameter.
ErrSparklineType = errors.New("parameter 'Type' must be 'line', 'column' or 'win_loss'")
// ErrSparklineLocation hat die Fehlermeldung bei fehlenden 'Location'-Parametern definiert.
ErrSparklineLocation = errors.New("parameter 'Location' is required")
// ErrSparklineRange hat die Fehlermeldung bei fehlenden Sparkline-'Range'-Parametern definiert.
ErrSparklineRange = errors.New("parameter 'Range' is required")
// ErrSparkline hat die Fehlermeldung beim Empfang der ungültigen Sparkline-Parameter definiert.
ErrSparkline = errors.New("must have the same number of 'Location' and 'Range' parameters")
// ErrSparklineStyle definiert die Fehlermeldung beim Empfang der ungültigen Sparkline-'Style'-Parameter.
ErrSparklineStyle = errors.New("parameter 'Style' must between 0-35")
)
```

Expand Down
2 changes: 1 addition & 1 deletion en/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Excelize is a library written in pure Go providing a set of functions that allow
- go.dev: [pkg.go.dev/github.com/xuri/excelize/v2](https://pkg.go.dev/github.com/xuri/excelize/v2)
- Licenses: [BSD 3-Clause](https://opensource.org/licenses/BSD-3-Clause)
- Last version: [v2.5.0](https://github.com/xuri/excelize/releases/latest)
- Document update time: January 8, 2022
- Document update time: January 10, 2022

## Project mission

Expand Down
6 changes: 3 additions & 3 deletions en/cell.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ SetCellStr provides a function to set the string type value of a cell. The total
## Set cell style {#SetCellStyle}

```go
func (f *File) SetCellStyle(sheet, hcell, vcell string, styleID int) error
func (f *File) SetCellStyle(sheet, hCell, vCell string, styleID int) error
```

SetCellStyle provides a function to add style attribute for cells by given worksheet name, coordinate area and style ID. Style indexes can be obtained with the [`NewStyle`](style.md#NewStyle) function. Note that `diagonalDown` and `diagonalUp` type border should use the same color in the same coordinate area. SetCellStyle will overwrite the existing styles for the cell, it won't append or merge style with existing styles.
Expand Down Expand Up @@ -475,7 +475,7 @@ The cell style index is obtained from the given worksheet name (case sensitive)
## Merge cells {#MergeCell}
```go
func (f *File) MergeCell(sheet, hcell, vcell string) error
func (f *File) MergeCell(sheet, hCell, vCell string) error
```
Merge cells based on the given worksheet name (case sensitive) and cell coordinate regions. Merging cells only keeps the upper-left cell value, and discards the other values. For example, merge cells in the `D3:E9` area on a worksheet named `Sheet1`:
Expand All @@ -489,7 +489,7 @@ If the given cell coordinate area overlaps with other existing merged cells, the
## Unmerge cells {#UnmergeCell}
```go
func (f *File) UnmergeCell(sheet string, hcell, vcell string) error
func (f *File) UnmergeCell(sheet string, hCell, vCell string) error
```
UnmergeCell provides a function to unmerge a given coordinate area. For example unmerge area `D3:E9` on `Sheet1`:
Expand Down
2 changes: 1 addition & 1 deletion en/constants.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const (
StrictNameSpaceSpreadSheet = "http://purl.oclc.org/ooxml/spreadsheetml/main"
NameSpaceDublinCore = "http://purl.org/dc/elements/1.1/"
NameSpaceDublinCoreTerms = "http://purl.org/dc/terms/"
NameSpaceDublinCoreMetadataIntiative = "http://purl.org/dc/dcmitype/"
NameSpaceDublinCoreMetadataInitiative = "http://purl.org/dc/dcmitype/"
ContentTypeDrawing = "application/vnd.openxmlformats-officedocument.drawing+xml"
ContentTypeDrawingML = "application/vnd.openxmlformats-officedocument.drawingml.chart+xml"
ContentTypeMacro = "application/vnd.ms-excel.sheet.macroEnabled.main+xml"
Expand Down
4 changes: 2 additions & 2 deletions en/stream.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ SetRow writes an array to stream row by given starting coordinate and a pointer
## Add table to stream {#AddTable}

```go
func (sw *StreamWriter) AddTable(hcell, vcell, format string) error
func (sw *StreamWriter) AddTable(hCell, vCell, format string) error
```

AddTable creates an Excel table for the StreamWriter using the given coordinate area and format set.
Expand Down Expand Up @@ -128,7 +128,7 @@ Note that the table must be at least two lines including the header. The header
## Merge cell to stream {#MergeCell}

```go
func (sw *StreamWriter) MergeCell(hcell, vcell string) error
func (sw *StreamWriter) MergeCell(hCell, vCell string) error
```

MergeCell provides a function to merge cells by a given coordinate area for the StreamWriter. Don't create a merged cell that overlaps with another existing merged cell.
Expand Down
Loading

0 comments on commit 5825d70

Please sign in to comment.