Skip to content

Add a new function SetCustomProps and GetCustomProps in docs #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.9.1](https://github.com/xuri/excelize/releases/latest)
- وقت تحديث المستند: يونيو 5, 2025
- وقت تحديث المستند: يونيو 24, 2025

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

Expand Down
2 changes: 2 additions & 0 deletions ar/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
* [احصل على خصائص التطبيق](workbook.md#GetAppProps)
* [تعيين خصائص الوثيقة](workbook.md#SetDocProps)
* [احصل على خصائص المستند](workbook.md#GetDocProps)
* [تعيين خصائص مخصصة](workbook.md#SetCustomProps)
* [الحصول على خصائص مخصصة](workbook.md#GetCustomProps)
* [تعيين خصائص الحساب](workbook.md#SetCalcProps)
* [الحصول على خصائص الحساب](workbook.md#GetCalcProps)
* [حماية المصنف](workbook.md#ProtectWorkbook)
Expand Down
25 changes: 25 additions & 0 deletions ar/workbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ const (
)
```

تُطابق `CustomProperty` مباشرةً الخاصية المخصصة للمصنف. قد يكون نوع تاريخ القيمة أحد الأنواع التالية: `int32`، `float64`، `string`، `bool`، `time.Time`، أو `nil`.

```go
type CustomProperty struct {
Name string
Value interface{}
}
```

تعرف CalcPropsOptions مجموعة الخصائص التي تستخدمها التطبيق لتسجيل حالة الحساب والتفاصيل.

```go
Expand Down Expand Up @@ -1009,6 +1018,22 @@ func (f *File) GetDocProps() (*DocProperties, error)

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

## تعيين خصائص مخصصة {#SetCustomProps}

```go
func (f *File) SetCustomProps(prop CustomProperty) error
```

توفر دالة SetCustomProps دالة لتعيين خصائص ملف مخصصة باستخدام اسم وقيمة الخاصية المحددين. إذا كان اسم الخاصية موجودًا بالفعل، فسيتم تحديثه، وإلا فسيتم إضافة خاصية جديدة. يمكن أن تكون القيمة من نوع `int32`، أو `float64`، أو `bool`، أو `string`، أو `time.Time`، أو `nil`. سيتم حذف الخاصية إذا كانت قيمتها `nil`. تُرجع الدالة خطأً إذا لم تكن قيمة الخاصية من النوع الصحيح.

## الحصول على خصائص مخصصة {#GetCustomProps}

```go
func (f *File) GetCustomProps() ([]CustomProperty, error)
```

توفر GetCustomProps وظيفة للحصول على خصائص ملف مخصصة.

## تعيين خصائص الحساب {#SetCalcProps}

```go
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.9.1](https://github.com/xuri/excelize/releases/latest)
- Dokument Aktualisierungszeit: Juni 5, 2025
- Dokument Aktualisierungszeit: Juni 24, 2025

## Project mission

Expand Down
2 changes: 2 additions & 0 deletions de/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
* [Anwendungseigenschaften abrufen](workbook.md#GetAppProps)
* [Festlegen von Dokumenteigenschaften](workbook.md#SetDocProps)
* [Abrufen von Dokumenteigenschaften](workbook.md#GetDocProps)
* [Festlegen benutzerdefinierter Eigenschaften](workbook.md#SetCustomProps)
* [Abrufen benutzerdefinierter Eigenschaften](workbook.md#GetCustomProps)
* [Festlegen von Berechnungseigenschaften](workbook.md#SetCalcProps)
* [Abrufen von Berechnungseigenschaften](workbook.md#GetCalcProps)
* [Arbeitsbuch schützen](workbook.md#ProtectWorkbook)
Expand Down
25 changes: 25 additions & 0 deletions de/workbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ const (
)
```

`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`.

```go
type CustomProperty struct {
Name string
Value interface{}
}
```

`CalcPropsOptions` definiert die Sammlung von Eigenschaften, die die Anwendung zum Aufzeichnen des Berechnungsstatus und von Berechnungsdetails verwendet.

```go
Expand Down Expand Up @@ -1004,6 +1013,22 @@ func (f *File) GetDocProps() (*DocProperties, error)

GetDocProps bietet eine Funktion zum Abrufen der Eigenschaften des Dokumentkerns.

## Festlegen benutzerdefinierter Eigenschaften {#SetCustomProps}

```go
func (f *File) SetCustomProps(prop CustomProperty) error
```

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.

## Abrufen benutzerdefinierter Eigenschaften {#GetCustomProps}

```go
func (f *File) GetCustomProps() ([]CustomProperty, error)
```

GetCustomProps bietet eine Funktion zum Abrufen benutzerdefinierter Dateieigenschaften.

## Festlegen von Berechnungseigenschaften {#SetCalcProps}

```go
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.9.1](https://github.com/xuri/excelize/releases/latest)
- Document update time: June 5, 2025
- Document update time: June 24, 2025

## Project mission

Expand Down
2 changes: 2 additions & 0 deletions en/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
* [Get application properties](workbook.md#GetAppProps)
* [Set document properties](workbook.md#SetDocProps)
* [Get document properties](workbook.md#GetDocProps)
* [Set custom properties](workbook.md#SetCustomProps)
* [Get custom properties](workbook.md#GetCustomProps)
* [Set calculation properties](workbook.md#SetCalcProps)
* [Get calculation properties](workbook.md#GetCalcProps)
* [Protect workbook](workbook.md#ProtectWorkbook)
Expand Down
25 changes: 25 additions & 0 deletions en/workbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ const (
)
```

`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`.

```go
type CustomProperty struct {
Name string
Value interface{}
}
```

`CalcPropsOptions` defines the collection of properties the application uses to record calculation status and details.

```go
Expand Down Expand Up @@ -1004,6 +1013,22 @@ func (f *File) GetDocProps() (*DocProperties, error)

GetDocProps provides a function to get document core properties.

## Set custom properties {#SetCustomProps}

```go
func (f *File) SetCustomProps(prop CustomProperty) error
```

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.

## Get custom properties {#GetCustomProps}

```go
func (f *File) GetCustomProps() ([]CustomProperty, error)
```

GetCustomProps provides a function to get custom file properties.

## Set calculation properties {#SetCalcProps}

```go
Expand Down
2 changes: 1 addition & 1 deletion es/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Excelize es una biblioteca escrita en Go puro que proporciona un conjunto de fun
- go.dev: [pkg.go.dev/github.com/xuri/excelize/v2](https://pkg.go.dev/github.com/xuri/excelize/v2)
- Licencias: [BSD 3-Clause](https://opensource.org/licenses/BSD-3-Clause)
- Ultima versión: [v2.9.1](https://github.com/xuri/excelize/releases/latest)
- Tiempo de actualización del documento: junio 5, 2025
- Tiempo de actualización del documento: junio 24, 2025

## Misión del proyecto

Expand Down
2 changes: 2 additions & 0 deletions es/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
* [Obtener propiedades de la aplicación](workbook.md#GetAppProps)
* [Establecer las propiedades del documento](workbook.md#SetDocProps)
* [Obtener propiedades del documento](workbook.md#GetDocProps)
* [Establecer propiedades personalizadas](workbook.md#SetCustomProps)
* [Obtenga propiedades personalizadas](workbook.md#GetCustomProps)
* [Establecer propiedades de cálculo](workbook.md#SetCalcProps)
* [Obtener propiedades de cálculo](workbook.md#GetCalcProps)
* [Proteger el libro de trabajo](workbook.md#ProtectWorkbook)
Expand Down
25 changes: 25 additions & 0 deletions es/workbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ const (
)
```

`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`.

```go
type CustomProperty struct {
Name string
Value interface{}
}
```

`CalcPropsOptions` define la colección de propiedades que utiliza la aplicación para registrar el estado y los detalles del cálculo.

```go
Expand Down Expand Up @@ -1004,6 +1013,22 @@ func (f *File) GetDocProps() (*DocProperties, error)

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

## Establecer propiedades personalizadas {#SetCustomProps}

```go
func (f *File) SetCustomProps(prop CustomProperty) error
```

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.

## Obtenga propiedades personalizadas {#GetCustomProps}

```go
func (f *File) GetCustomProps() ([]CustomProperty, error)
```

GetCustomProps proporciona una función para obtener propiedades de archivos personalizadas.

## Establecer propiedades de cálculo {#SetCalcProps}

```go
Expand Down
2 changes: 1 addition & 1 deletion fr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Excelize est une bibliothèque écrite en pure Go fournissant un ensemble de fon
- 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)
- Dernière version: [v2.9.1](https://github.com/xuri/excelize/releases/latest)
- Heure de mise à jour du document: 5 juin 2025
- Heure de mise à jour du document: 24 juin 2025

## Mission du projet

Expand Down
2 changes: 2 additions & 0 deletions fr/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
* [Obtenir les propriétés de l'application](workbook.md#GetAppProps)
* [Définir les propriétés du document](workbook.md#SetDocProps)
* [Obtenir les propriétés du document](workbook.md#GetDocProps)
* [Définir des propriétés personnalisées](workbook.md#SetCustomProps)
* [Obtenir des propriétés personnalisées](workbook.md#GetCustomProps)
* [Définir les propriétés de calcul](workbook.md#SetCalcProps)
* [Obtenir les propriétés de calcul](workbook.md#GetCalcProps)
* [Protéger le classeur](workbook.md#ProtectWorkbook)
Expand Down
25 changes: 25 additions & 0 deletions fr/workbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ const (
)
```

`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`.

```go
type CustomProperty struct {
Name string
Value interface{}
}
```

`CalcPropsOptions` définit la collection de propriétés que l'application utilise pour enregistrer l'état et les détails du calcul.

```go
Expand Down Expand Up @@ -1004,6 +1013,22 @@ func (f *File) GetDocProps() (*DocProperties, error)

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

## Définir des propriétés personnalisées {#SetCustomProps}

```go
func (f *File) SetCustomProps(prop CustomProperty) error
```

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.

## Obtenir des propriétés personnalisées {#GetCustomProps}

```go
func (f *File) GetCustomProps() ([]CustomProperty, error)
```

GetCustomProps fournit une fonction pour obtenir des propriétés de fichier personnalisées.

## Définir les propriétés de calcul {#SetCalcProps}

```go
Expand Down
2 changes: 1 addition & 1 deletion it/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Excelize è una libreria scritta in puro Go che fornisce una serie di funzioni c
- go.dev: [pkg.go.dev/github.com/xuri/excelize/v2](https://pkg.go.dev/github.com/xuri/excelize/v2)
- Licenze: [BSD 3-Clause](https://opensource.org/licenses/BSD-3-Clause)
- Ultima versione: [v2.9.1](https://github.com/xuri/excelize/releases/latest)
- Orario aggiornamento documento: giugno 5, 2025
- Orario aggiornamento documento: giugno 24, 2025

## Missione del progetto

Expand Down
2 changes: 2 additions & 0 deletions it/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
* [Ottieni le proprietà dell'applicazione](workbook.md#GetAppProps)
* [Imposta le proprietà del documento](workbook.md#SetDocProps)
* [Ottieni le proprietà del documento](workbook.md#GetDocProps)
* [Imposta proprietà personalizzate](workbook.md#SetCustomProps)
* [Ottieni proprietà personalizzate](workbook.md#GetCustomProps)
* [Imposta le proprietà di calcolo](workbook.md#SetCalcProps)
* [Ottieni le proprietà di calcolo](workbook.md#GetCalcProps)
* [Proteggi la cartella di lavoro](workbook.md#ProtectWorkbook)
Expand Down
25 changes: 25 additions & 0 deletions it/workbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ const (
)
```

`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`.

```go
type CustomProperty struct {
Name string
Value interface{}
}
```

`CalcPropsOptions` definisce la raccolta di proprietà che l'applicazione utilizza per registrare lo stato e i dettagli del calcolo.

```go
Expand Down Expand Up @@ -1012,6 +1021,22 @@ func (f *File) GetDocProps() (*DocProperties, error)

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

## Imposta proprietà personalizzate {#SetCustomProps}

```go
func (f *File) SetCustomProps(prop CustomProperty) error
```

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.

## Ottieni proprietà personalizzate {#GetCustomProps}

```go
func (f *File) GetCustomProps() ([]CustomProperty, error)
```

GetCustomProps fornisce una funzione per ottenere proprietà di file personalizzate.

## Imposta le proprietà di calcolo {#SetCalcProps}

```go
Expand Down
2 changes: 1 addition & 1 deletion ja/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Excelize は、純粋な Go で記述されたライブラリで、XLAM / XLSM /
- 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.9.1](https://github.com/xuri/excelize/releases/latest)
- ドキュメントの更新:2025年6月5日
- ドキュメントの更新:2025年6月24日

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

Expand Down
2 changes: 2 additions & 0 deletions ja/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
* [アプリケーションのプロパティを取得する](workbook.md#GetAppProps)
* [ドキュメントのプロパティを設定する](workbook.md#SetDocProps)
* [ドキュメントのプロパティを取得する](workbook.md#GetDocProps)
* [カスタムプロパティを設定する](workbook.md#SetCustomProps)
* [カスタムプロパティを取得する](workbook.md#GetCustomProps)
* [計算プロパティを設定する](workbook.md#SetCalcProps)
* [計算プロパティを取得する](workbook.md#GetCalcProps)
* [ブックを保護する](workbook.md#ProtectWorkbook)
Expand Down
25 changes: 25 additions & 0 deletions ja/workbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ const (
)
```

`CustomProperty` は、ワークブックのカスタムプロパティを直接マッピングします。値の日付型は、`int32`、`float64`、`string`、`bool`、`time.Time`、`nil` のいずれかになります。

```go
type CustomProperty struct {
Name string
Value interface{}
}
```

`CalcPropsOptions` は、計算の状態と詳細を記録するためにアプリケーションが使用するプロパティのコレクションを定義します。

```go
Expand Down Expand Up @@ -1004,6 +1013,22 @@ func (f *File) GetDocProps() (*DocProperties, error)

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

## カスタムプロパティを設定する {#SetCustomProps}

```go
func (f *File) SetCustomProps(prop CustomProperty) error
```

SetCustomPropsは、指定されたプロパティ名と値でカスタムファイルプロパティを設定する関数を提供します。プロパティ名が既に存在する場合は更新され、存在しない場合は新しいプロパティが追加されます。値の型は、`int32`、`float64`、`bool`、`string`、`time.Time`、または `nil` です。値が `nil` の場合、プロパティは削除されます。プロパティ値が正しい型でない場合、関数はエラーを返します。

## カスタムプロパティを取得する {#GetCustomProps}

```go
func (f *File) GetCustomProps() ([]CustomProperty, error)
```

GetCustomProps は、カスタム ファイル プロパティを取得する関数を提供します。

## 計算プロパティを設定する {#SetCalcProps}

```go
Expand Down
Loading