|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
select * from Sheet1;
create temp table aa as
select fillna(iif(f01 like '客户%',rowid,'')) grp,udf_fillna_m(iif(f01 like '客户%',f02,''),'k') 客户,iif(f05='日期',f06,'') 日期,iif(f05='订单',f06,'') 订单,iif(f03 like '' or f03 like '名称','', regexp2('\d+',f01)) 编号,iif(f03 like '' or f03 like '名称','', f03) 名称,iif(f03 like '' or f03 like '名称','', regexp2('\d+',f05)) 单价,iif(f03 like '' or f03 like '名称','', regexp2('\d+',f06)) 数量,iif(f03 like '' or f03 like '名称','', regexp2('\d+',f07)) 金额 from Sheet1;
create temp table bb as
select grp,group_concat(日期,'') 日期, group_concat(订单,'') 订单,客户 from aa group by grp;
select * from bb join (select grp,编号,名称,单价,数量,金额 from aa where not (名称 like '' or 名称 like '名称')) a using(grp)
|
|