xlsx-to-html-extractor


Namexlsx-to-html-extractor JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/markolofsen/xlsx-to-html-extractor
SummaryA Python utility to convert Excel sheets to HTML files, with options to include formulas, grid labels, and cell titles.
upload_time2024-05-15 11:26:05
maintainerNone
docs_urlNone
authorMark
requires_python>=3.6
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# xlsx-to-html-extractor

`xlsx-to-html-extractor` is a Python utility that converts Excel sheets to HTML files. It provides options to include formulas, grid labels, and cell titles.

## Features

- Convert Excel sheets to HTML files.
- Option to include formulas in the HTML output.
- Option to add grid labels (row and column numbers).
- Option to add cell titles showing the cell addresses.

## Installation

You can install the package using pip:

```bash
pip install xlsx-to-html-extractor`` 
```

## Usage

### Basic Usage

Here's a basic example of how to use the `XlsxExtractor` class:

```python
from xlsx_to_html_extractor import XlsxExtractor

# Initialize the extractor
extractor = XlsxExtractor(
    source_xlsx='data.xlsx',
    dest_html_file='result.html',
    show_formulas=False,
    grid_labels=True,
    cell_titles=True
)

# Extract the data and save to HTML
extractor.extract()` 
```

### Parameters

-   `source_xlsx`: Path to the source Excel file.
-   `dest_html_file`: Path to the destination HTML file.
-   `show_formulas`: Boolean flag to include formulas in the HTML output.
-   `grid_labels`: Boolean flag to add grid labels (row and column numbers).
-   `cell_titles`: Boolean flag to add cell titles showing the cell addresses.

## Examples

### Including Formulas

To include formulas in the HTML output, set `show_formulas` to `True`:

```python
from xlsx_to_html_extractor import XlsxExtractor

extractor = XlsxExtractor(
    source_xlsx='data.xlsx',
    dest_html_file='result.html',
    show_formulas=True,
    grid_labels=True,
    cell_titles=True
)

extractor.extract()
```

### Adding Grid Labels

To add grid labels (row and column numbers), set `grid_labels` to `True`:

```python
from xlsx_to_html_extractor import XlsxExtractor

extractor = XlsxExtractor(
    source_xlsx='data.xlsx',
    dest_html_file='result.html',
    show_formulas=False,
    grid_labels=True,
    cell_titles=False
)

extractor.extract()
```

### Adding Cell Titles

To add cell titles showing the cell addresses, set `cell_titles` to `True`:

```python
from xlsx_to_html_extractor import XlsxExtractor

extractor = XlsxExtractor(
    source_xlsx="data.xlsx",
    dest_html_file="result.html",
    show_formulas=False,
    grid_labels=False,
    cell_titles=True
)
extractor.extract()
```

## License

This project is licensed under the MIT License.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/markolofsen/xlsx-to-html-extractor",
    "name": "xlsx-to-html-extractor",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "Mark",
    "author_email": "markolofsen@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/dd/7b/051477c696fb55b5fa25910c33f66e8edebbd3647e5cefdc4f0d3fc2e18e/xlsx_to_html_extractor-0.1.0.tar.gz",
    "platform": null,
    "description": "\n# xlsx-to-html-extractor\n\n`xlsx-to-html-extractor` is a Python utility that converts Excel sheets to HTML files. It provides options to include formulas, grid labels, and cell titles.\n\n## Features\n\n- Convert Excel sheets to HTML files.\n- Option to include formulas in the HTML output.\n- Option to add grid labels (row and column numbers).\n- Option to add cell titles showing the cell addresses.\n\n## Installation\n\nYou can install the package using pip:\n\n```bash\npip install xlsx-to-html-extractor`` \n```\n\n## Usage\n\n### Basic Usage\n\nHere's a basic example of how to use the `XlsxExtractor` class:\n\n```python\nfrom xlsx_to_html_extractor import XlsxExtractor\n\n# Initialize the extractor\nextractor = XlsxExtractor(\n    source_xlsx='data.xlsx',\n    dest_html_file='result.html',\n    show_formulas=False,\n    grid_labels=True,\n    cell_titles=True\n)\n\n# Extract the data and save to HTML\nextractor.extract()` \n```\n\n### Parameters\n\n-   `source_xlsx`: Path to the source Excel file.\n-   `dest_html_file`: Path to the destination HTML file.\n-   `show_formulas`: Boolean flag to include formulas in the HTML output.\n-   `grid_labels`: Boolean flag to add grid labels (row and column numbers).\n-   `cell_titles`: Boolean flag to add cell titles showing the cell addresses.\n\n## Examples\n\n### Including Formulas\n\nTo include formulas in the HTML output, set `show_formulas` to `True`:\n\n```python\nfrom xlsx_to_html_extractor import XlsxExtractor\n\nextractor = XlsxExtractor(\n    source_xlsx='data.xlsx',\n    dest_html_file='result.html',\n    show_formulas=True,\n    grid_labels=True,\n    cell_titles=True\n)\n\nextractor.extract()\n```\n\n### Adding Grid Labels\n\nTo add grid labels (row and column numbers), set `grid_labels` to `True`:\n\n```python\nfrom xlsx_to_html_extractor import XlsxExtractor\n\nextractor = XlsxExtractor(\n    source_xlsx='data.xlsx',\n    dest_html_file='result.html',\n    show_formulas=False,\n    grid_labels=True,\n    cell_titles=False\n)\n\nextractor.extract()\n```\n\n### Adding Cell Titles\n\nTo add cell titles showing the cell addresses, set `cell_titles` to `True`:\n\n```python\nfrom xlsx_to_html_extractor import XlsxExtractor\n\nextractor = XlsxExtractor(\n    source_xlsx=\"data.xlsx\",\n    dest_html_file=\"result.html\",\n    show_formulas=False,\n    grid_labels=False,\n    cell_titles=True\n)\nextractor.extract()\n```\n\n## License\n\nThis project is licensed under the MIT License.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Python utility to convert Excel sheets to HTML files, with options to include formulas, grid labels, and cell titles.",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/markolofsen/xlsx-to-html-extractor"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2242d8b5ef2d9c581d6f6cbdcec9ae5d8399fd09c91e61db9d49381cd0823fb0",
                "md5": "257d751662aca546ab343bdf7194d4a8",
                "sha256": "07b801812d18db69654eb2a4ad3cd1d46a53cdd78f4e3d0c847f63918abbf087"
            },
            "downloads": -1,
            "filename": "xlsx_to_html_extractor-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "257d751662aca546ab343bdf7194d4a8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 4106,
            "upload_time": "2024-05-15T11:26:04",
            "upload_time_iso_8601": "2024-05-15T11:26:04.148810Z",
            "url": "https://files.pythonhosted.org/packages/22/42/d8b5ef2d9c581d6f6cbdcec9ae5d8399fd09c91e61db9d49381cd0823fb0/xlsx_to_html_extractor-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dd7b051477c696fb55b5fa25910c33f66e8edebbd3647e5cefdc4f0d3fc2e18e",
                "md5": "29c4bd1a54dfe917f8f7bd14b7564cef",
                "sha256": "a606d99fb6104073475a73fdab84f63e6eeaa0fad945217f90e51e366617b6f2"
            },
            "downloads": -1,
            "filename": "xlsx_to_html_extractor-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "29c4bd1a54dfe917f8f7bd14b7564cef",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 3577,
            "upload_time": "2024-05-15T11:26:05",
            "upload_time_iso_8601": "2024-05-15T11:26:05.943460Z",
            "url": "https://files.pythonhosted.org/packages/dd/7b/051477c696fb55b5fa25910c33f66e8edebbd3647e5cefdc4f0d3fc2e18e/xlsx_to_html_extractor-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-15 11:26:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "markolofsen",
    "github_project": "xlsx-to-html-extractor",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "xlsx-to-html-extractor"
}
        
Elapsed time: 0.23144s