#robin language #使用空白文档启动 Excel Excel.Launch \ Visible:True \ LoadAddInsAndMacros:False \ Instance=> ExcelInstance #将新工作表添加到 Excel 实例的文档中 Excel.AddWorksheet \ Instance:ExcelInstance \ Name:"数据" \ WorksheetPosition:Excel.WorksheetPosition.First #获取图片路径 FileData.GetPicPath \ Pic_Path:'C:\Users\leung\Desktop\test' \ Pic_PathList=> Pic_PathList LOOP FOREACH variable IN Pic_PathList SET item To 0 #GetIdCardInfo_功能描述,获取身份证照片上的信息 BaiDuAI.GetIdCardInfo \ API_KEY:'百度的API_KEY' \ SECRET_KEY:'百度的SECRET_KEY' \ idCard_Side:'front' \ Pic_Path:variable \ IdCardInfo_Result=> IdCardInfo_Result #检索活动工作表的第一个空闲列和/或行。这对于将新数据添加到已经有数据的工作表中很有用 Excel.GetFirstFreeColumnRow \ Instance: ExcelInstance \ FirstFreeColumn=> FirstFreeColumn \ FirstFreeRow=> FirstFreeRow LOOP FOREACH variable2 IN IdCardInfo_Result #按特定数量增加变量值 Variables.IncreaseVariable \ Value: 1 \ IncrementValue: item\ IncreasedValue=> item #在 Excel 实例的指定单元格中写入一些值 Excel.WriteCell \ Instance:ExcelInstance \ Value: variable2 \ Column: item \ Row:FirstFreeRow END END #使用指定格式关闭并保存 Excel 实例 Excel.CloseAndSaveAs \ Instance: ExcelInstance \ DocumentFormat:Excel.ExcelFormat.FromExtension \ DocumentPath:"C:\Users\leung\Desktop\test\test.xlsx"