Skip to main content

Плагин для гибкой настройки Excel документов.

Project description

ExcelPlugin

Python Version License PyPI Version

Features

  • 🎨 Advanced cell styling (fonts, borders, alignment)
  • 📊 Seamless pandas DataFrames integration
  • 🔄 Excel template processing
  • 📈 Batch operations support
  • 🖥️ CLI interface for quick operations

Installation

pip install ExcelPlugin

Quick Start

from ExcelPlugin import MultiExcel

# Создаем объекты DataFrame
df_2 = pd.DataFrame()
df_1 = pd.DataFrame()

multi = MultiExcel() # Создаем объект MultiExcel

# Добавляем страницы 
multi.add_sheet(df, 'data_1')  # Добавляем страницу 'data_1' и DataFrame
multi.add_sheet(df, 'data_1')  

#
header_rows = [
    [((1, 3), 'Titile1'), ((4, 10), 'Titile2')],
    [((1, 4), 'Titile1'), ((5, 7), 'Titile2'), ((8, 10), 'Title3')],
]

# Создаем шапку Excel документа
multi['data_1'].add_header()  # Обязательно нужно вызвать метод add_header() для создания заголовков.
# Если передать в add_header() аргументы -> получим многоуровневый заголовки
multi['data_2'].add_header(header_rows)

# Форматируем столбцы 
multi['data_1'].set_money_column(MONEY_COLUMN: Union[List[str], None]=None)  
multi['data_1'].set_percent_column(PERCENT_COLUMN: Union[List[str], None]=None)  
multi['data_1'].set_date_column(DATE_COLUMN: Union[List[str], None]=None) 

# Переименование страниц Excel
multi.rename_sheet(old_name='data_1', new_name='new_data_1') 

# Изменение порядка листов
multi = multi[['data_2', 'data1']]

# Сохранение
multi.save(filename=fr"{filename_email}" + ".xlsx", filepath=filepath)  # Сохраняем файл

CLI Usage

# Apply template styles
excel-plugin apply-styles --input data.xlsx --template styles.json --output styled.xlsx

# Convert CSV to styled Excel
excel-plugin csv2xlsx data.csv --output report.xlsx

Documentation

Full documentation available at GitHub Wiki

Contributing

Pull requests are welcome! See CONTRIBUTING.md for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

excelplugin-0.1.8.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ExcelPlugin-0.1.8-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file excelplugin-0.1.8.tar.gz.

File metadata

  • Download URL: excelplugin-0.1.8.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for excelplugin-0.1.8.tar.gz
Algorithm Hash digest
SHA256 db0fe7a28653344b23192ceea5a755205fd87a3e6120c1a676f64f77fd914377
MD5 7fdfa1137b0c96a6fe1ecdb2d33e0b54
BLAKE2b-256 fa5455dcfd712d0897d1fad5ca5a3b917a4263d01ec2a98eaf0e4c7815aa28bd

See more details on using hashes here.

File details

Details for the file ExcelPlugin-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: ExcelPlugin-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for ExcelPlugin-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 6afce1fedbb2f7069e2cdea393b4c95d970deb7e57fffea23e7cc55546e00a0d
MD5 0e49a8738e3fb63ccf3c793815b8e4f9
BLAKE2b-256 7708c393a944c8fb4b140b0f209128f50c694e42ec510846bdbf315074ad22dc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page