Le livre de travail
Vue de l’ensemble
‘Workbook’ est une classe dans Aspose.Cells FOSS pour Typescript.
La classe Workbook fournit un point d’entrée de haut niveau pour charger les fichiers de feuille de travail existants, manipuler les feuilles de travaux et enregistrer dans des formats tels que XLSX et HTML.
Cette classe fournit 9 méthodes pour travailler avec des objets de Workbook dans les programmes Typescript. Les méthodologies disponibles comprennent: constructor, getNumFmt , ’load ، 'protect ; save; toCsv : tHtml et Json . Tous les membres publics sont accessibles à toute application TypeScript après avoir installé l’Aspose.Cells FOSS pour le package Typscript . Propriétés : ‘activeTabou 'borderId', 'celles', ‘charts',code` c’ et plus 15.
Description
‘Workbook’ est une classe dans la bibliothèque Aspose.Cells FOSS pour TypeScript qui expose 8 méthodes et 27 propriétés pour l’utilisation programmée.
Les capacités de base comprennent : ‘collection des feuilles d’œuvre’, ‘string[]’ et ‘boolean’.Ces opérations permettent aux développeurs d’intégrer directement la fonctionnalité du livre de travail dans les applications TypeScript.
La classe fournit également la propriété des « feuilles de travail » (qui prend les feuillets), la possession des “sharedStrings” (qu’ils ont des files partagées) et la « non protégée » (« protégeé »).
Les instances sont créées à travers un constructeur unique qui initialisera l’objet avec des valeurs par défaut.
Propriétés
| Name | Type | Access | Description |
|---|---|---|---|
worksheets | WorksheetCollection | Read | Gets the worksheets. |
sharedStrings | string[] | Read | Gets the shared strings. |
isProtected | boolean | Read | Gets the is protected. |
charts | ChartInfo[] | Read | Gets the charts. |
images | ImageInfo[] | Read | Gets the images. |
activeTab | number | Read/Write | Gets the active tab. |
password | : string | Read | Gets the password. |
saveFormat | : SaveFormat | Read | Gets the save format. |
password | : string | Read | Gets the password. |
saveFormat | : SaveFormat | Read | Gets the save format. |
col | : number | Read | Gets the col. |
colOff | : number | Read | Gets the col off. |
row | : number | Read | Gets the row. |
rowOff | : number | Read | Gets the row off. |
col | : number | Read | Gets the col. |
colOff | : number | Read | Gets the col off. |
row | : number | Read | Gets the row. |
rowOff | : number | Read | Gets the row off. |
id | : number | Read | Gets the id. |
code | : string | Read | Gets the code. |
fontId | : number | Read | Gets the font id. |
fillId | : number | Read | Gets the fill id. |
borderId | : number | Read | Gets the border id. |
numFmtId | : number | Read | Gets the num fmt id. |
style | : Style | Read | Gets the style. |
sheetName | : string | Read | Gets the sheet name. |
cells | : { [key: string]: CellValue } | Read | Gets the cells. |
méthodes
| Signature | Description |
|---|---|
constructor(createDefault: boolean) | Initializes a new Workbook, optionally creating a default worksheet. |
load(filePath: string, password: string) → Promise<Workbook> | Asynchronously loads a spreadsheet file from the given path and returns a Workbook instance. |
| `getNumFmt(numFmtId: string | null)→string` |
protect(protect: boolean, password: string) | Enables or disables workbook protection with the given password. |
save(filePath: string, options: { password?: string; saveFormat?: SaveFormat }) | Saves the workbook to the given file path using the specified options. |
toHtml() → string | Converts the workbook to an HTML string. |
toCsv() → string | Converts the workbook to a CSV string. |
toJson() → string | Converts the workbook to a JSON string. |
toMarkdown() → string | Converts the workbook to a Markdown string. |
Voir aussi
- Aspose.Cells — référence API d’entreprise