Skip to content

Latest commit

 

History

History
68 lines (42 loc) · 1.11 KB

File metadata and controls

68 lines (42 loc) · 1.11 KB

Excel to HTML Converter

A simple Python script that reads data from an Excel file (.xlsx) and exports it as an HTML table.


📋 Features

  • Read Excel files using pandas
  • Convert data to a clean, formatted HTML table
  • Save output as an HTML file (ot.html)

⚙️ Requirements

Make sure you have Python and the following library installed:

pip install pandas openpyxl

🚀 Usage

  1. Place your Excel file (for example, OT.xlsx) in the same folder as the script.
  2. Run the script:
python main.py
  1. After execution, a file named ot.html will be created in the same directory.

🧠 Example Code

# Import the required dependency
import pandas as pd

# Read Excel file
df = pd.read_excel("OT.xlsx")

# Export as HTML file
df.to_html("ot.html")

📁 Output

  • Input file: OT.xlsx
  • Output file: ot.html

🧩 Notes

  • This script works best with tabular data (rows and columns).
  • You can customize the output file name or HTML styling if needed.

Author: Md Shahriar Parvez License: MIT License