import pandas as pd from openpyxl import load_workbook # 读取原始Excel input_path = "/root/.openclaw/media/inbound/12-5---1879d0c9-7cdf-4cd5-9aff-f03091ebada3.xlsx" output_path = "/root/.openclaw/workspace-xiaoyan/L1-S1-U12-L5_组件完成版.xlsx" # 定义组件内容,按顺序对应表格中的组件行 components = [ # 1112501 对话朗读 """【任务标题】描述当前时间 【资源配置】 图片时机:【互动内容】 音频载体:无 【情境引入】 无 【互动内容】 User: It is still night.(朗读) 【互动反馈】 正确:无 错误:Vicky : Wait, that didn't sound right. 【后置对话】 无""", # 1112502 图片单选 """【任务标题】等待清晨 【情境引入】 无 【互动内容】 题干:We must wait for the $morning$. 选项: 00 01(正确) 辅助信息:morning指"清晨" 【互动反馈】 正确:无 错误:Sally : Oh no, that's not right. Look outside, it's still dark! 【后置对话】 无""", # 1112503 对话朗读 """【任务标题】询问清晨时间 【资源配置】 图片时机:无 音频载体:无 【情境引入】 无 【互动内容】 Vicky: How do we know when it's morning?(朗读) 【互动反馈】 正确:无 错误:Sally : Hmm, I didn't catch that. Can you say it again? 【后置对话】 无""", # 1112504 对话朗读 """【任务标题】表达尝试意愿 【资源配置】 图片时机:无 音频载体:无 【情境引入】 无 【互动内容】 User: I'd like to try too.(朗读) 【互动反馈】 正确:无 错误:Sally : Oh, that doesn't sound quite right. 【后置对话】 Ben: Me too.""", # 1112505 对话朗读 """【任务标题】尝试做手影狗 【资源配置】 图片时机:无 音频载体:无 【情境引入】 无 【互动内容】 User: I want to try to make a dog!(朗读) 【互动反馈】 正确:无 错误:Lucy : Wait, what did you say? I didn't get it. 【后置对话】 无""", # 1112506 对话朗读 """【任务标题】评价夜晚乐趣 【资源配置】 图片时机:无 音频载体:无 【情境引入】 无 【互动内容】 User: Night is so much fun!(朗读) 【互动反馈】 正确:无 错误:Lucy : Hmm, that didn't sound right. 【后置对话】 无""", # 1112507 对话挖空 """【任务标题】否定当前是清晨 【资源配置】 图片时机:无 音频载体:无 【情境引入】 无 【互动内容】 题干:It isn't ____. 选项: 选项1:night 选项2:morning(正确) 辅助信息:morning指"清晨" 【互动反馈】 正确:无 错误:Ben : Oh no, that's wrong. It's still dark out! 【后置对话】 无""", # 1112508 对话挖空 """【任务标题】确认当前是夜晚 【资源配置】 图片时机:无 音频载体:无 【情境引入】 无 【互动内容】 题干:It is still ____! 选项: 选项1:night(正确) 选项2:morning 辅助信息:night指"夜晚" 【互动反馈】 正确:无 错误:Ben : Wait, that's not right. The sun isn't up yet! 【后置对话】 无""", # 1112509 对话朗读 """【任务标题】提议逐个尝试 【资源配置】 图片时机:无 音频载体:无 【情境引入】 无 【互动内容】 User: Let's try them one by one!(朗读) 【互动反馈】 正确:无 错误:Sally : Hmm, that didn't sound quite right. 【后置对话】 无""", # 1112510 对话选读 """【任务标题】尝试下一个格子 【资源配置】 图片时机:无 音频载体:无 【情境引入】 无 【互动内容】 请选择一句朗读: 选项1:Let's try the next! 选项2:Let's try them one by one! 辅助信息:两个选项均为正确答案 【互动反馈】 正确:无 错误:Sally : Oh, that's not one of the choices. 【后置对话】 无""", # 1112510 图片有序 """【任务标题】排序跳格子顺序 【情境引入】 无 【互动内容】 题干:Put the actions in order of $one by one$. 选项: 00 01 02 03 正确顺序:00→01→02→03 辅助信息:one by one指"一个接一个" 【互动反馈】 正确:无 错误:Dan : Oops, that's the wrong order! We can't jump like that. 【后置对话】 无""", # 1112511 对话挖空 """【任务标题】提议尝试另一块格子 【资源配置】 图片时机:无 音频载体:无 【情境引入】 无 【互动内容】 题干:____ that one. 选项: 选项1:let's try(正确) 选项2:let's play 辅助信息:let's try指"我们试试" 【互动反馈】 正确:无 错误:Dan : Wait, that doesn't make sense. 【后置对话】 无""", # 1112512 对话朗读 """【任务标题】询问下一个人选 【资源配置】 图片时机:无 音频载体:无 【情境引入】 无 【互动内容】 User: Who is the next?(朗读) 【互动反馈】 正确:无 错误:Sally : Hmm, that didn't sound quite right. 【后置对话】 Vicky: It's my turn!""", # 1112513 对话挖空 """【任务标题】描述灯逐个亮起 【资源配置】 图片时机:【互动内容】 音频载体:无 【情境引入】 无 【互动内容】 题干:The lights are turning on ____! 选项: 选项1:one by one(正确) 选项2:two by two 辅助信息:one by one指"一个接一个" 【互动反馈】 正确:无 错误:Lucy : Oh no, that's wrong! The lights are turning on in order. 【后置对话】 无""", # 1112514 对话组句 """【任务标题】组句提议尝试 【资源配置】 图片时机:无 音频载体:无 【情境引入】 User: The first tile didn't work. 【互动内容】 题目:提议大家试试另一块格子 选项1:try this 选项2:Let's 选项3:one. 答案:Let's try this one. 辅助信息:Let's do sth.是提议做某事的固定句式 【互动反馈】 正确:无 错误:Sally : Oops, that's not the right sentence. 【后置对话】 无""", # 1112516 对话组句 """【任务标题】组句逐个行动 【资源配置】 图片时机:无 音频载体:无 【情境引入】 Sally: We need to stand on the tiles one after another. 【互动内容】 题目:告诉大家要一个接一个做 选项1:Let's do it 选项2:one 选项3:by 选项4:one! 答案:Let's do it one by one! 辅助信息:one by one是固定搭配,意思是"一个接一个" 【互动反馈】 正确:无 错误:Sally : Oh, that doesn't make sense. Try again. 【后置对话】 无""", # 1112517 对话选择 """【任务标题】判断当前时间 【资源配置】 图片时机:【互动内容】 音频载体:无 【情境引入】 Fred: I see the light from the lighthouse! 【互动内容】 Wow! It's so bright! ____ 选项: 选项1:It's morning now!(正确) 选项2:It's night now! 辅助信息:morning指"清晨",night指"夜晚" 【互动反馈】 正确:无 错误:Fred : Wait, that's not right! Look at the sun in the sky! 【后置对话】 无""" ] # 加载工作簿 wb = load_workbook(input_path) ws = wb.active # 找到组件列(第7列,索引从1开始) component_col = 7 # 找到有组件ID的行,从第6行开始是数据行 component_row_start = 6 # 逐个填入组件内容 for i, comp in enumerate(components): row = component_row_start + i ws.cell(row=row, column=component_col, value=comp) # 保存文件 wb.save(output_path) print(f"文件已保存到: {output_path}")