|
发表于 2024-1-10 22:15
来自手机
|
显示全部楼层
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
create temp table aa as
select f02,fillna(iif(regexp('^\d+',f03),rowid,'')) r,f03 from consolidateSheet where f03!='-';
create temp table bb as
select *,regexp2('A\.\s*(\S+)\s',f03,1) A,regexp2('B\.\s*(\S+)\b',f03,1) B,regexp2('C\.\s*(\S+)\b',f03,1) C,regexp2('D\.\s*(\S+)\b',f03,1) D,regexp2('E\.\s*(\S+)\b',f03,1) E,regexp2('(\s*(([A-E],?)+)\s*)',f03,1) 答案 from aa;
//select * from bb;
create temp table cc as
select r,f02,regreplace('(.*$','',f03) 题,max(A) A,max(A) B,max(C) C ,max(D) D ,max(E) E,max(答案) 答案 from bb b group by r;
//cli_to_xl~cc;
select * from cc;
|
|