Workbook

General

Workbook és una classe en Aspose.Cells per Python.

Representa un llibre de treball d’Excel.

Propietats

NomTipus de productesAccésDescripció
worksheets``Llegeix.Ofereix accés a la col·lecció de fulles d’obra del llibre.
file_path``Llegeix.Recolza la ruta del sistema de fitxers del llibre de treball.
properties``Llegeix.Conté propietats de nivell del llibre, com autor i títol.
document_properties``Llegeix.Exposar les propietats de metadades del llibre de treball en el document.
protection``Llegeix.Representa les configuracions de protecció del llibre de treball.

Mètodes

SignaturaDescripció
__init__(file_path, password)Inicialitza una nova instància de classe Workbook.
add_worksheet(name)Afegeix una nova plantilla al llibre de treball.
get_worksheet(index_or_name)Obté una fitxa de treball per indexe o nom.
remove_worksheet(index_or_name)Elimina una fitxa de treball del llibre.
unprotect(password)Eliminar la estructura del llibre de treball/protecció de finestres.
create_worksheet(name)Crear i afegir una nova fitxa de treball.
get_worksheet_by_name(name)Retorna la fulla de treball amb el nom donat, o Ningú si no es troba.
get_worksheet_by_index(index)Retorna la fitxa de treball en l’índex basat en 0 donat, o Ningú si està fora del rang.
get_active_worksheet()Retorna la fitxa de treball en actiu.
set_active_worksheet(index_or_name_or_ws)Configurar la fitxa activa per indexe, nom o objecte de la Fitxa.
copy_worksheet(index_or_name_or_ws)Copiar una fitxa de treball i afegir la còpia al llibre.
protect(password, lock_structure, lock_windows)Protegeix la estructura/ventaneres del llibre de treball amb una contrasenya opcional.
is_protected()Retorna True si el llibre té activada la protecció de estructura o finestra.
save(file_path, save_format, options, password, encryption_params)Salva el llibre de treball en un fitxer.
save_as_csv(file_path, options)Salva el llibre de treball en un arxiu CSV.
load_csv(file_path, options)Carrega dades d’un fitxer CSV al llibre de treball.
save_as_markdown(file_path, options)Salva el llibre de treball en un fitxer Markdown.
save_as_json(file_path, options)Salva el llibre en un fitxer JSON.
 Català