# 最简写法 from flask import Flask import pandas as pd app = Flask(__name__) @app.route("/") def index(): df = pd.read_excel("test.xlsx") return df.to_html() if __name__ == "__main__": app.run(debug=True)