Initial commit: 批量退课工具项目
This commit is contained in:
15
generate_template.py
Normal file
15
generate_template.py
Normal file
@@ -0,0 +1,15 @@
|
||||
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}")
|
||||
Reference in New Issue
Block a user