import os print("测试开始") print(f"当前目录: {os.getcwd()}") input_file = r'D:\计量经济学\计量实验资料及作业要求\计量实验资料及作业要求\图文帖子实验数据(新).xlsx' print(f"文件存在: {os.path.exists(input_file)}") if os.path.exists(input_file): print(f"文件大小: {os.path.getsize(input_file) / 1024:.2f} KB") print("尝试读取...") try: import pandas as pd df = pd.read_excel(input_file, nrows=10) print(f"成功读取 {len(df)} 行") print("测试完成") except Exception as e: print(f"错误: {e}")