{"library":"spire-xls","title":"Spire.XLS for Python","type":"library","description":"Spire.XLS for Python is a standalone Excel API designed for processing Excel files (XLS, XLSX, XLSB, XLSM, CSV) within Python applications. It allows developers to create, read, write, convert, and print Excel documents without requiring Microsoft Office. The current version is 16.4.0, and it maintains a regular release cadence with multiple updates annually.","language":"python","status":"active","last_verified":"Thu Apr 16","install":{"commands":["pip install spire-xls"],"cli":null},"imports":["from spire.xls import Workbook","from spire.xls import FileFormat","from spire.xls import SaveFormat"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":"https://www.e-iceblue.com","github":null,"docs":null,"changelog":null,"pypi":"https://pypi.org/project/spire-xls/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"from spire.xls import Workbook, SaveFormat\n\n# Create a new workbook\nworkbook = Workbook()\n# Access the first worksheet (0-indexed)\nsheet = workbook.Worksheets[0]\n\n# Write data to cells using A1 notation\nsheet.Range[\"A1\"].Value = \"Hello, Spire.XLS!\"\nsheet.Range[\"B1\"].Value2 = 12345\n\n# Auto-fit columns\nsheet.AllocatedRange.AutoFitColumns()\n\n# Define the output file path\noutput_file = \"output_spire_xls_quickstart.xlsx\"\n\n# Save the workbook in XLSX format\nworkbook.SaveToFile(output_file, SaveFormat.Xlsx)\nworkbook.Dispose()\n\nprint(f\"Excel file saved to {output_file}\")","lang":"python","description":"This quickstart demonstrates how to create a new Excel workbook, write data to cells using A1 notation, auto-fit columns, and save the workbook as an XLSX file. The `Dispose()` method is called to release resources.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}