将格内多行文字展开成多格

表格的A列是分类,B列由多行文字组成,即分隔符是换行符。

|---|----------------|-------------------------------------------------------------------------------------------------------------------------|
| | A | B |
| 1 | Account Number | Interaction |
| 2 | 1 | Jan 1,2023 - Hello. |
| 3 | 2 | Jan 2, 2023 - Good morning. Jan 3, 2023 - Good night. Jan 4, 20 Jan 5, 2023 - Good night. Jan 6, 2023 - Good afternoon. |
| 4 | 3 | Jan 1,2023 - Good night. Jan 2, 2023 - Good afternoon. |

请将B列的每格展开成多个单元格,并复制A列

|---|----------------|-------------------------------|
| | A | B |
| 1 | Account Number | Interaction |
| 2 | 1 | Jan 1,2023 - Hello. |
| 3 | 2 | Jan 2, 2023 - Good morning. |
| 4 | 2 | Jan 3, 2023 - Good night. |
| 5 | 2 | Jan 4, 20 |
| 6 | 2 | Jan 5, 2023 - Good night. |
| 7 | 2 | Jan 6, 2023 - Good afternoon. |
| 8 | 3 | Jan 1,2023 - Good night. |
| 9 | 3 | Jan 2, 2023 - Good afternoon. |

使用 SPL XLL

复制代码
=spl("=?.news@q(~2.import@si();[get(1)(1),~])",A2:B4)

函数 news@q 用序列的成员生成新序列,~2 是当前变量的第 2 个成员,import@si将字符串按回车解析成单行字符串组成的序列,get 在多层循环中按层数返回循环变量。

相关推荐
Eiceblue17 小时前
使用 Python 实现 Excel 行列转置(保留单元格样式)
前端·python·excel
开开心心_Every19 小时前
内存清理工具定时自动清理开机自启动
java·开发语言·spring·计算机外设·ocr·intellij-idea·excel
Knight_AL1 天前
从 EasyExcel 到 Apache Fesod:Java Excel 处理生态的一次重构
java·apache·excel
泡海椒1 天前
JQuick-Excel 多字段 TRANSFORM:让当前行字段、JContext 与展示列各归其位
开发语言·python·excel
泡海椒1 天前
JQuick-Excel FORMULAS 实战:把计算规则留在工作簿中
excel
xiaolinudao1231 天前
将多个 Excel 表格中的数据合并到单个表中|6 种实现方案全解析
java·前端·excel
reasonsummer1 天前
【办公类-193-01】20261010 豆包写“带班表EXCEL”
excel·豆包
泡海椒2 天前
JQuick-Excel 中 FORMULAS 与 TRANSFORM 的边界
excel
泡海椒2 天前
JQuick-Excel 复杂 STYLE 实战:把报表样式拆成可维护的坐标规则
excel
百数平台3 天前
百数表格知识库配置指南:Excel/CSV 上传、表结构字段类型与 NL2SQL 查询全说明
excel