示例一:
读取Excel,打印拼接的Sql
import com.alibaba.excel.EasyExcel
class Obj {
Integer num;
String name;
}
def readerBuilder = EasyExcel.read(new File(/C:\Users\kiss\Documents\2023-02\demo.xlsx/),
Obj, null)
List<Obj> list = readerBuilder.sheet(0).doReadSync()
list.each {
def sql = /insert into sup_home_response_detail(id, company_name, show, order_num) values(uuid(), \
'$it.name', 0, $it.num);/
println sql
标签:Groovy,name,EasyExcel,Excel,num,sql
From: https://www.cnblogs.com/windyWu/p/17170580.html