'commit'
This commit is contained in:
24
Tools/T4_5_ZhaoShengCount.py
Normal file
24
Tools/T4_5_ZhaoShengCount.py
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
import openpyxl # 添加缺少的导入
|
||||||
|
import json
|
||||||
|
import os
|
||||||
|
|
||||||
|
from Config.Config import EXCEL_PATH
|
||||||
|
from Util.AreaUtil import query_area_info
|
||||||
|
|
||||||
|
# 创建数据保存目录
|
||||||
|
DATA_DIR = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'Data')
|
||||||
|
os.makedirs(DATA_DIR, exist_ok=True)
|
||||||
|
JSON_PATH = os.path.join(DATA_DIR, 'MaoRuXueLv.json') # 修改为毛入学率的JSON路径
|
||||||
|
|
||||||
|
file_name = EXCEL_PATH
|
||||||
|
enrollment_data = []
|
||||||
|
name_conversion_errors = [] # 记录转换失败的名称
|
||||||
|
conversion_records = [] # 定义转换记录变量
|
||||||
|
|
||||||
|
# 加载工作簿并选择招生数Sheet
|
||||||
|
workbook = openpyxl.load_workbook(file_name, read_only=True)
|
||||||
|
if '招生数' not in workbook.sheetnames:
|
||||||
|
print("❌ 错误:未找到'招生数'Sheet")
|
||||||
|
exit(1)
|
||||||
|
sheet = workbook['招生数']
|
||||||
|
|
Reference in New Issue
Block a user