A wrapper library to read, manipulate and write data in xlsx and xlsm format
76
A utility that round-trips Excel workbooks while preserving formula tokens and numeric formatting.
=SUM(B2:C2) alongside its referenced numeric cells, saving and reloading the workbook returns sheet data where the formula cell remains a formula string instead of a computed value. @test$#,##0.00, 0.00%, yyyy-mm-dd) after saving and reopening, and their underlying numeric values are unchanged. @test@generates
from typing import Any, BinaryIO, Dict, List, Union
WorkbookData = Dict[str, List[List[Any]]]
def preserve_round_trip(source: Union[str, BinaryIO], target: Union[str, BinaryIO]) -> WorkbookData:
"""
Read a workbook from source (file path or binary stream), write it back to target
(file path or binary stream), and return reloaded sheet data with the same sheet
ordering. Ensures formula strings and numeric formatting survive the round-trip,
keeping empty sheets as empty row lists.
"""Excel IO plugin used for reading and writing .xlsx/.xlsm files while preserving formulas and numeric formatting.
Install with Tessl CLI
npx tessl i tessl/pypi-pyexcel-xlsxdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10