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

表格的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 在多层循环中按层数返回循环变量。

相关推荐
Dxy12393102161 天前
Python设置Excel表格边框样式:从基础到高级
前端·python·excel
开开心心就好1 天前
一款既是直播工具又是浏览器的软件
linux·运维·服务器·智能手机·逻辑回归·excel·最小二乘法
第五文修2 天前
wps表格内编写一个JSA宏用来背单词
excel·wps
小脑斧1232 天前
DBExport2.51 Oracle数据库查询与Excel数据导出工具
数据库·oracle·excel
开开心心_Every2 天前
跨平台高速下载工具,支持浏览器功能强大
运维·服务器·随机森林·pdf·电脑·逻辑回归·excel
AC赳赳老秦2 天前
OpenClaw权限管理实操:团队共享Agent,设置操作权限,保障数据安全
服务器·开发语言·前端·javascript·excel·deepseek·openclaw
Teable任意门互动2 天前
多维表格哪家最好用最容易上手?国产开源 Teable 测评
开发语言·数据库·开源·excel·飞书·开源软件
wtsolutions3 天前
Excel-to-JSON Local App - Secure Offline Excel to JSON Conversion
json·excel
qq_452396234 天前
第七篇:《数据驱动测试:利用Excel/JSON/CSV管理测试数据》
json·excel
是吗乔治4 天前
vuetify实现excel表格粘贴效果
前端·vue.js·vue·excel