Skip to content

Commit 803337c

Browse files
authored
Add a new function SetCustomProps and GetCustomProps in docs (#30)
1 parent 9934e19 commit 803337c

36 files changed

+336
-12
lines changed

ar/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Excelize هي مكتبة مكتوبة في الذهاب نقية توفير مج
99
- go.dev: [pkg.go.dev/github.com/xuri/excelize/v2](https://pkg.go.dev/github.com/xuri/excelize/v2)
1010
- التراخيص: [BSD 3-Clause](https://opensource.org/licenses/BSD-3-Clause)
1111
- الإصدار الأخير: [v2.9.1](https://github.com/xuri/excelize/releases/latest)
12-
- وقت تحديث المستند: يونيو 5, 2025
12+
- وقت تحديث المستند: يونيو 24, 2025
1313

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

ar/SUMMARY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
* [احصل على خصائص التطبيق](workbook.md#GetAppProps)
4646
* [تعيين خصائص الوثيقة](workbook.md#SetDocProps)
4747
* [احصل على خصائص المستند](workbook.md#GetDocProps)
48+
* [تعيين خصائص مخصصة](workbook.md#SetCustomProps)
49+
* [الحصول على خصائص مخصصة](workbook.md#GetCustomProps)
4850
* [تعيين خصائص الحساب](workbook.md#SetCalcProps)
4951
* [الحصول على خصائص الحساب](workbook.md#GetCalcProps)
5052
* [حماية المصنف](workbook.md#ProtectWorkbook)

ar/workbook.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ const (
5050
)
5151
```
5252

53+
تُطابق `CustomProperty` مباشرةً الخاصية المخصصة للمصنف. قد يكون نوع تاريخ القيمة أحد الأنواع التالية: `int32`، `float64`، `string`، `bool`، `time.Time`، أو `nil`.
54+
55+
```go
56+
type CustomProperty struct {
57+
Name string
58+
Value interface{}
59+
}
60+
```
61+
5362
تعرف CalcPropsOptions مجموعة الخصائص التي تستخدمها التطبيق لتسجيل حالة الحساب والتفاصيل.
5463

5564
```go
@@ -1009,6 +1018,22 @@ func (f *File) GetDocProps() (*DocProperties, error)
10091018

10101019
يوفر GetDocProps وظيفة للحصول على خصائص المستند الأساسية.
10111020

1021+
## تعيين خصائص مخصصة {#SetCustomProps}
1022+
1023+
```go
1024+
func (f *File) SetCustomProps(prop CustomProperty) error
1025+
```
1026+
1027+
توفر دالة SetCustomProps دالة لتعيين خصائص ملف مخصصة باستخدام اسم وقيمة الخاصية المحددين. إذا كان اسم الخاصية موجودًا بالفعل، فسيتم تحديثه، وإلا فسيتم إضافة خاصية جديدة. يمكن أن تكون القيمة من نوع `int32`، أو `float64`، أو `bool`، أو `string`، أو `time.Time`، أو `nil`. سيتم حذف الخاصية إذا كانت قيمتها `nil`. تُرجع الدالة خطأً إذا لم تكن قيمة الخاصية من النوع الصحيح.
1028+
1029+
## الحصول على خصائص مخصصة {#GetCustomProps}
1030+
1031+
```go
1032+
func (f *File) GetCustomProps() ([]CustomProperty, error)
1033+
```
1034+
1035+
توفر GetCustomProps وظيفة للحصول على خصائص ملف مخصصة.
1036+
10121037
## تعيين خصائص الحساب {#SetCalcProps}
10131038

10141039
```go

de/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Excelize ist eine Bibliothek, die in reinem Go geschrieben wurde und eine Reihe
99
- go.dev: [pkg.go.dev/github.com/xuri/excelize/v2](https://pkg.go.dev/github.com/xuri/excelize/v2)
1010
- Lizenzen: [BSD 3-Clause](https://opensource.org/licenses/BSD-3-Clause)
1111
- Letzte Version: [v2.9.1](https://github.com/xuri/excelize/releases/latest)
12-
- Dokument Aktualisierungszeit: Juni 5, 2025
12+
- Dokument Aktualisierungszeit: Juni 24, 2025
1313

1414
## Project mission
1515

de/SUMMARY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
* [Anwendungseigenschaften abrufen](workbook.md#GetAppProps)
4646
* [Festlegen von Dokumenteigenschaften](workbook.md#SetDocProps)
4747
* [Abrufen von Dokumenteigenschaften](workbook.md#GetDocProps)
48+
* [Festlegen benutzerdefinierter Eigenschaften](workbook.md#SetCustomProps)
49+
* [Abrufen benutzerdefinierter Eigenschaften](workbook.md#GetCustomProps)
4850
* [Festlegen von Berechnungseigenschaften](workbook.md#SetCalcProps)
4951
* [Abrufen von Berechnungseigenschaften](workbook.md#GetCalcProps)
5052
* [Arbeitsbuch schützen](workbook.md#ProtectWorkbook)

de/workbook.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ const (
5050
)
5151
```
5252

53+
`CustomProperty` bildet die benutzerdefinierte Eigenschaft der Arbeitsmappe direkt ab. Der Datumstyp des Werts kann einer der folgenden sein: `int32`, `float64`, `string`, `bool`, `time.Time` oder `nil`.
54+
55+
```go
56+
type CustomProperty struct {
57+
Name string
58+
Value interface{}
59+
}
60+
```
61+
5362
`CalcPropsOptions` definiert die Sammlung von Eigenschaften, die die Anwendung zum Aufzeichnen des Berechnungsstatus und von Berechnungsdetails verwendet.
5463

5564
```go
@@ -1004,6 +1013,22 @@ func (f *File) GetDocProps() (*DocProperties, error)
10041013
10051014
GetDocProps bietet eine Funktion zum Abrufen der Eigenschaften des Dokumentkerns.
10061015
1016+
## Festlegen benutzerdefinierter Eigenschaften {#SetCustomProps}
1017+
1018+
```go
1019+
func (f *File) SetCustomProps(prop CustomProperty) error
1020+
```
1021+
1022+
SetCustomProps bietet eine Funktion zum Festlegen benutzerdefinierter Dateieigenschaften anhand des angegebenen Eigenschaftsnamens und -werts. Existiert der Eigenschaftsname bereits, wird er aktualisiert, andernfalls wird eine neue Eigenschaft hinzugefügt. Der Wert kann vom Typ `int32`, `float64`, `bool`, `string`, `time.Time` oder `nil` sein. Bei einem Wert von `nil` wird die Eigenschaft gelöscht. Die Funktion gibt einen Fehler zurück, wenn der Eigenschaftswert nicht vom richtigen Typ ist.
1023+
1024+
## Abrufen benutzerdefinierter Eigenschaften {#GetCustomProps}
1025+
1026+
```go
1027+
func (f *File) GetCustomProps() ([]CustomProperty, error)
1028+
```
1029+
1030+
GetCustomProps bietet eine Funktion zum Abrufen benutzerdefinierter Dateieigenschaften.
1031+
10071032
## Festlegen von Berechnungseigenschaften {#SetCalcProps}
10081033
10091034
```go

en/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Excelize is a library written in pure Go providing a set of functions that allow
99
- go.dev: [pkg.go.dev/github.com/xuri/excelize/v2](https://pkg.go.dev/github.com/xuri/excelize/v2)
1010
- Licenses: [BSD 3-Clause](https://opensource.org/licenses/BSD-3-Clause)
1111
- Last version: [v2.9.1](https://github.com/xuri/excelize/releases/latest)
12-
- Document update time: June 5, 2025
12+
- Document update time: June 24, 2025
1313

1414
## Project mission
1515

en/SUMMARY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
* [Get application properties](workbook.md#GetAppProps)
4646
* [Set document properties](workbook.md#SetDocProps)
4747
* [Get document properties](workbook.md#GetDocProps)
48+
* [Set custom properties](workbook.md#SetCustomProps)
49+
* [Get custom properties](workbook.md#GetCustomProps)
4850
* [Set calculation properties](workbook.md#SetCalcProps)
4951
* [Get calculation properties](workbook.md#GetCalcProps)
5052
* [Protect workbook](workbook.md#ProtectWorkbook)

en/workbook.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ const (
5050
)
5151
```
5252

53+
`CustomProperty` directly maps the custom property of the workbook. The value date type may be one of the following: `int32`, `float64`, `string`, `bool`, `time.Time`, or `nil`.
54+
55+
```go
56+
type CustomProperty struct {
57+
Name string
58+
Value interface{}
59+
}
60+
```
61+
5362
`CalcPropsOptions` defines the collection of properties the application uses to record calculation status and details.
5463

5564
```go
@@ -1004,6 +1013,22 @@ func (f *File) GetDocProps() (*DocProperties, error)
10041013
10051014
GetDocProps provides a function to get document core properties.
10061015
1016+
## Set custom properties {#SetCustomProps}
1017+
1018+
```go
1019+
func (f *File) SetCustomProps(prop CustomProperty) error
1020+
```
1021+
1022+
SetCustomProps provides a function to set custom file properties by given property name and value. If the property name already exists, it will be updated, otherwise a new property will be added. The value can be of type `int32`, `float64`, `bool`, `string`, `time.Time` or `nil`. The property will be delete if the value is `nil`. The function returns an error if the property value is not of the correct type.
1023+
1024+
## Get custom properties {#GetCustomProps}
1025+
1026+
```go
1027+
func (f *File) GetCustomProps() ([]CustomProperty, error)
1028+
```
1029+
1030+
GetCustomProps provides a function to get custom file properties.
1031+
10071032
## Set calculation properties {#SetCalcProps}
10081033
10091034
```go

es/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Excelize es una biblioteca escrita en Go puro que proporciona un conjunto de fun
99
- go.dev: [pkg.go.dev/github.com/xuri/excelize/v2](https://pkg.go.dev/github.com/xuri/excelize/v2)
1010
- Licencias: [BSD 3-Clause](https://opensource.org/licenses/BSD-3-Clause)
1111
- Ultima versión: [v2.9.1](https://github.com/xuri/excelize/releases/latest)
12-
- Tiempo de actualización del documento: junio 5, 2025
12+
- Tiempo de actualización del documento: junio 24, 2025
1313

1414
## Misión del proyecto
1515

es/SUMMARY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
* [Obtener propiedades de la aplicación](workbook.md#GetAppProps)
4646
* [Establecer las propiedades del documento](workbook.md#SetDocProps)
4747
* [Obtener propiedades del documento](workbook.md#GetDocProps)
48+
* [Establecer propiedades personalizadas](workbook.md#SetCustomProps)
49+
* [Obtenga propiedades personalizadas](workbook.md#GetCustomProps)
4850
* [Establecer propiedades de cálculo](workbook.md#SetCalcProps)
4951
* [Obtener propiedades de cálculo](workbook.md#GetCalcProps)
5052
* [Proteger el libro de trabajo](workbook.md#ProtectWorkbook)

es/workbook.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ const (
5050
)
5151
```
5252

53+
`CustomProperty` asigna directamente la propiedad personalizada del libro. El tipo de fecha del valor puede ser uno de los siguientes: `int32`, `float64`, `string`, `bool`, `time.Time` o `nil`.
54+
55+
```go
56+
type CustomProperty struct {
57+
Name string
58+
Value interface{}
59+
}
60+
```
61+
5362
`CalcPropsOptions` define la colección de propiedades que utiliza la aplicación para registrar el estado y los detalles del cálculo.
5463

5564
```go
@@ -1004,6 +1013,22 @@ func (f *File) GetDocProps() (*DocProperties, error)
10041013

10051014
GetDocProps proporciona una función para obtener las propiedades principales del documento.
10061015

1016+
## Establecer propiedades personalizadas {#SetCustomProps}
1017+
1018+
```go
1019+
func (f *File) SetCustomProps(prop CustomProperty) error
1020+
```
1021+
1022+
SetCustomProps proporciona una función para establecer propiedades de archivo personalizadas según el nombre y el valor de la propiedad. Si el nombre de la propiedad ya existe, se actualizará; de lo contrario, se añadirá una nueva. El valor puede ser de tipo `int32`, `float64`, `bool`, `string`, `time.Time` o `nil`. La propiedad se eliminará si el valor es `nil`. La función devuelve un error si el valor de la propiedad no es del tipo correcto.
1023+
1024+
## Obtenga propiedades personalizadas {#GetCustomProps}
1025+
1026+
```go
1027+
func (f *File) GetCustomProps() ([]CustomProperty, error)
1028+
```
1029+
1030+
GetCustomProps proporciona una función para obtener propiedades de archivos personalizadas.
1031+
10071032
## Establecer propiedades de cálculo {#SetCalcProps}
10081033

10091034
```go

fr/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Excelize est une bibliothèque écrite en pure Go fournissant un ensemble de fon
99
- go.dev: [pkg.go.dev/github.com/xuri/excelize/v2](https://pkg.go.dev/github.com/xuri/excelize/v2)
1010
- Licenses: [BSD 3-Clause](https://opensource.org/licenses/BSD-3-Clause)
1111
- Dernière version: [v2.9.1](https://github.com/xuri/excelize/releases/latest)
12-
- Heure de mise à jour du document: 5 juin 2025
12+
- Heure de mise à jour du document: 24 juin 2025
1313

1414
## Mission du projet
1515

fr/SUMMARY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
* [Obtenir les propriétés de l'application](workbook.md#GetAppProps)
4646
* [Définir les propriétés du document](workbook.md#SetDocProps)
4747
* [Obtenir les propriétés du document](workbook.md#GetDocProps)
48+
* [Définir des propriétés personnalisées](workbook.md#SetCustomProps)
49+
* [Obtenir des propriétés personnalisées](workbook.md#GetCustomProps)
4850
* [Définir les propriétés de calcul](workbook.md#SetCalcProps)
4951
* [Obtenir les propriétés de calcul](workbook.md#GetCalcProps)
5052
* [Protéger le classeur](workbook.md#ProtectWorkbook)

fr/workbook.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ const (
5050
)
5151
```
5252

53+
`CustomProperty` mappe directement la propriété personnalisée du classeur. Le type de date de valeur peut être: `int32`, `float64`, `string`, `bool`, `time.Time` ou `nil`.
54+
55+
```go
56+
type CustomProperty struct {
57+
Name string
58+
Value interface{}
59+
}
60+
```
61+
5362
`CalcPropsOptions` définit la collection de propriétés que l'application utilise pour enregistrer l'état et les détails du calcul.
5463

5564
```go
@@ -1004,6 +1013,22 @@ func (f *File) GetDocProps() (*DocProperties, error)
10041013

10051014
GetDocProps fournit une fonction pour obtenir les propriétés de base du document.
10061015

1016+
## Définir des propriétés personnalisées {#SetCustomProps}
1017+
1018+
```go
1019+
func (f *File) SetCustomProps(prop CustomProperty) error
1020+
```
1021+
1022+
SetCustomProps fournit une fonction permettant de définir des propriétés de fichier personnalisées selon un nom et une valeur donnés. Si le nom de la propriété existe déjà, il sera mis à jour; sinon, une nouvelle propriété sera ajoutée. La valeur peut être de type `int32`, `float64`, `bool`, `string`, `time.Time` ou `nil`. La propriété sera supprimée si elle est égale à `nil`. La fonction renvoie une erreur si la valeur de la propriété n'est pas du type correct.
1023+
1024+
## Obtenir des propriétés personnalisées {#GetCustomProps}
1025+
1026+
```go
1027+
func (f *File) GetCustomProps() ([]CustomProperty, error)
1028+
```
1029+
1030+
GetCustomProps fournit une fonction pour obtenir des propriétés de fichier personnalisées.
1031+
10071032
## Définir les propriétés de calcul {#SetCalcProps}
10081033
10091034
```go

it/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Excelize è una libreria scritta in puro Go che fornisce una serie di funzioni c
99
- go.dev: [pkg.go.dev/github.com/xuri/excelize/v2](https://pkg.go.dev/github.com/xuri/excelize/v2)
1010
- Licenze: [BSD 3-Clause](https://opensource.org/licenses/BSD-3-Clause)
1111
- Ultima versione: [v2.9.1](https://github.com/xuri/excelize/releases/latest)
12-
- Orario aggiornamento documento: giugno 5, 2025
12+
- Orario aggiornamento documento: giugno 24, 2025
1313

1414
## Missione del progetto
1515

it/SUMMARY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
* [Ottieni le proprietà dell'applicazione](workbook.md#GetAppProps)
4646
* [Imposta le proprietà del documento](workbook.md#SetDocProps)
4747
* [Ottieni le proprietà del documento](workbook.md#GetDocProps)
48+
* [Imposta proprietà personalizzate](workbook.md#SetCustomProps)
49+
* [Ottieni proprietà personalizzate](workbook.md#GetCustomProps)
4850
* [Imposta le proprietà di calcolo](workbook.md#SetCalcProps)
4951
* [Ottieni le proprietà di calcolo](workbook.md#GetCalcProps)
5052
* [Proteggi la cartella di lavoro](workbook.md#ProtectWorkbook)

it/workbook.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ const (
5050
)
5151
```
5252

53+
`CustomProperty` mappa direttamente la proprietà personalizzata della cartella di lavoro. Il tipo di data del valore può essere uno dei seguenti: `int32`, `float64`, `string`, `bool`, `time.Time` o `nil`.
54+
55+
```go
56+
type CustomProperty struct {
57+
Name string
58+
Value interface{}
59+
}
60+
```
61+
5362
`CalcPropsOptions` definisce la raccolta di proprietà che l'applicazione utilizza per registrare lo stato e i dettagli del calcolo.
5463

5564
```go
@@ -1012,6 +1021,22 @@ func (f *File) GetDocProps() (*DocProperties, error)
10121021

10131022
GetDocProps fornisce una funzione per ottenere le proprietà principali del documento.
10141023

1024+
## Imposta proprietà personalizzate {#SetCustomProps}
1025+
1026+
```go
1027+
func (f *File) SetCustomProps(prop CustomProperty) error
1028+
```
1029+
1030+
SetCustomProps fornisce una funzione per impostare proprietà di file personalizzate in base al nome e al valore della proprietà specificati. Se il nome della proprietà esiste già, verrà aggiornato, altrimenti verrà aggiunta una nuova proprietà. Il valore può essere di tipo `int32`, `float64`, `bool`, `string`, `time.Time` o `nil`. La proprietà verrà eliminata se il valore è `nil`. La funzione restituisce un errore se il valore della proprietà non è del tipo corretto.
1031+
1032+
## Ottieni proprietà personalizzate {#GetCustomProps}
1033+
1034+
```go
1035+
func (f *File) GetCustomProps() ([]CustomProperty, error)
1036+
```
1037+
1038+
GetCustomProps fornisce una funzione per ottenere proprietà di file personalizzate.
1039+
10151040
## Imposta le proprietà di calcolo {#SetCalcProps}
10161041

10171042
```go

ja/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Excelize は、純粋な Go で記述されたライブラリで、XLAM / XLSM /
99
- go.dev: [pkg.go.dev/github.com/xuri/excelize/v2](https://pkg.go.dev/github.com/xuri/excelize/v2)
1010
- ライセンス契約: [BSD 3-Clause](https://opensource.org/licenses/BSD-3-Clause)
1111
- 現在のバージョン: [v2.9.1](https://github.com/xuri/excelize/releases/latest)
12-
- ドキュメントの更新:2025年6月5日
12+
- ドキュメントの更新:2025年6月24日
1313

1414
## プロジェクトミッション
1515

ja/SUMMARY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
* [アプリケーションのプロパティを取得する](workbook.md#GetAppProps)
4646
* [ドキュメントのプロパティを設定する](workbook.md#SetDocProps)
4747
* [ドキュメントのプロパティを取得する](workbook.md#GetDocProps)
48+
* [カスタムプロパティを設定する](workbook.md#SetCustomProps)
49+
* [カスタムプロパティを取得する](workbook.md#GetCustomProps)
4850
* [計算プロパティを設定する](workbook.md#SetCalcProps)
4951
* [計算プロパティを取得する](workbook.md#GetCalcProps)
5052
* [ブックを保護する](workbook.md#ProtectWorkbook)

ja/workbook.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ const (
5050
)
5151
```
5252

53+
`CustomProperty` は、ワークブックのカスタムプロパティを直接マッピングします。値の日付型は、`int32``float64``string``bool``time.Time``nil` のいずれかになります。
54+
55+
```go
56+
type CustomProperty struct {
57+
Name string
58+
Value interface{}
59+
}
60+
```
61+
5362
`CalcPropsOptions` は、計算の状態と詳細を記録するためにアプリケーションが使用するプロパティのコレクションを定義します。
5463

5564
```go
@@ -1004,6 +1013,22 @@ func (f *File) GetDocProps() (*DocProperties, error)
10041013

10051014
ワークブックのコアとなるプロパティを取得してください。
10061015

1016+
## カスタムプロパティを設定する {#SetCustomProps}
1017+
1018+
```go
1019+
func (f *File) SetCustomProps(prop CustomProperty) error
1020+
```
1021+
1022+
SetCustomPropsは、指定されたプロパティ名と値でカスタムファイルプロパティを設定する関数を提供します。プロパティ名が既に存在する場合は更新され、存在しない場合は新しいプロパティが追加されます。値の型は、`int32``float64``bool``string``time.Time`、または `nil` です。値が `nil` の場合、プロパティは削除されます。プロパティ値が正しい型でない場合、関数はエラーを返します。
1023+
1024+
## カスタムプロパティを取得する {#GetCustomProps}
1025+
1026+
```go
1027+
func (f *File) GetCustomProps() ([]CustomProperty, error)
1028+
```
1029+
1030+
GetCustomProps は、カスタム ファイル プロパティを取得する関数を提供します。
1031+
10071032
## 計算プロパティを設定する {#SetCalcProps}
10081033

10091034
```go

0 commit comments

Comments
 (0)