{"id":7646,"library":"pyxlsx","title":"Fast XLSX Reader","description":"Pyxlsx is a fast and memory-efficient Python library designed for reading data from XLSX (Excel) files. It focuses on parsing core data, shared strings, and basic styling, making it suitable for high-performance data extraction. The current stable version is 1.1.3, and releases are typically made for bug fixes and minor improvements as needed.","status":"active","version":"1.1.3","language":"python","source_language":"en","source_url":"https://github.com/fortfall/pyxlsx","tags":["excel","xlsx","parser","reader","spreadsheet","data-extraction"],"install":[{"cmd":"pip install pyxlsx","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"Required for efficient parsing of XML components within XLSX files. This is a core dependency.","package":"lxml","optional":false}],"imports":[{"wrong":"from pyxlsx import Reader","symbol":"ExcelReader","correct":"from pyxlsx import ExcelReader"},{"symbol":"Workbook","correct":"from pyxlsx import Workbook"},{"symbol":"open_xlsx","correct":"from pyxlsx import open_xlsx"}],"quickstart":{"code":"import openpyxl\nimport os\nfrom pyxlsx import Reader\n\n# Create a dummy XLSX file for demonstration\nfile_path = \"example.xlsx\"\nworkbook = openpyxl.Workbook()\nsheet = workbook.active\nsheet['A1'] = \"Name\"\nsheet['B1'] = \"Age\"\nsheet['A2'] = \"Alice\"\nsheet['B2'] = 30\nsheet['A3'] = \"Bob\"\nsheet['B3'] = 24\nworkbook.save(file_path)\n\nprint(f\"Created dummy file: {file_path}\")\n\n# Use pyxlsx to read the file\ntry:\n    reader = Reader(file_path)\n    # pyxlsx iterators are one-pass; convert to list if you need to iterate multiple times\n    rows_data = list(reader.rows())\n    \n    if rows_data:\n        print(\"Header row:\", rows_data[0])\n        print(\"Data rows:\")\n        for row in rows_data[1:]:\n            print(row)\n    else:\n        print(\"No data found in the file.\")\n\nexcept FileNotFoundError:\n    print(f\"Error: The file {file_path} was not found. Please ensure it exists.\")\nexcept Exception as e:\n    print(f\"An unexpected error occurred: {e}\")\nfinally:\n    # Clean up the dummy file\n    if os.path.exists(file_path):\n        os.remove(file_path)\n        print(f\"Cleaned up dummy file: {file_path}\")","lang":"python","description":"This quickstart demonstrates how to create a simple XLSX file using `openpyxl` and then read its contents using `pyxlsx`. It shows basic row iteration and includes cleanup."},"warnings":[{"fix":"For writing or full manipulation, consider libraries like `openpyxl` or `xlsxwriter`.","message":"Pyxlsx is a reader-only library. It does not support writing, modifying, or creating XLSX files. Features like macros, charts, and complex formulas are also not parsed.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure `lxml` is installed successfully. On some systems, you might need to install development headers (e.g., `sudo apt-get install libxml2-dev libxslt1-dev` on Debian/Ubuntu, or `brew install libxml2 libxslt` on macOS) before `pip install lxml`.","message":"The `lxml` dependency can sometimes be challenging to install, especially on systems without pre-compiled wheels or proper C compiler setup. It's crucial for `pyxlsx`'s performance.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Inspect output for specific cell types. For dates, consider using `datetime.datetime.fromtimestamp` or similar after parsing if the raw numeric value is returned.","message":"Pyxlsx provides basic parsing of cell values. While it handles basic number and date formatting, complex date/time formats, custom number formats, or cells with errors might be returned as their raw underlying value or require additional post-processing.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"search_vec":"'1.1.3':47 'basic':31 'bug':54 'core':26 'current':43 'data':17,27,40,67 'data-extract':66 'design':14 'effici':11 'excel':20,61 'extract':41,68 'fast':1,7 'file':21 'fix':55 'focus':23 'high':38 'high-perform':37 'improv':58 'librari':13 'made':52 'make':33 'memori':10 'memory-effici':9 'minor':57 'need':60 'pars':25 'parser':63 'perform':39 'python':12 'pyxlsx':4 'read':16 'reader':3,64 'releas':49 'share':28 'spreadsheet':65 'stabl':44 'string':29 'style':32 'suitabl':35 'typic':51 'version':45 'xlsx':2,19,62","created_at":"2026-04-16T14:07:18.386711+00:00","updated_at":"2026-04-16T14:07:18.386711+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.1.3","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/fortfall/pyxlsx","docs":null,"changelog":null,"pypi":"https://pypi.org/project/pyxlsx/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization","data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}