15 lines
494 B
Python
15 lines
494 B
Python
import pandas as pd
|
|
import os
|
|
|
|
# Define the path to the public directory
|
|
public_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'toolbox-app', 'public'))
|
|
# Define the full path for the Excel file
|
|
file_path = os.path.join(public_dir, '退课列表.xlsx')
|
|
|
|
# Create a DataFrame with the specified headers
|
|
df = pd.DataFrame(columns=['学生ID', '课程班ID'])
|
|
|
|
# Save the DataFrame to an Excel file
|
|
df.to_excel(file_path, index=False)
|
|
|
|
print(f"Template file created at {file_path}") |