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

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

相关推荐
wtsolutions18 小时前
Excel-to-JSON本地化Excel插件发布 - 在Excel中安全离线转换数据
安全·json·excel
用户2986985301419 小时前
Python 实现 Excel 与 TXT 文本的高效转换与导出
后端·python·excel
程序员小郭8320 小时前
Java + POI 实现高性能Excel导出(支持普通List、MyBatis Cursor流式导出、VO适配)
spring boot·后端·excel
AI导出鸭PC端3 天前
告别导出难题:AI 导出鸭助力 Claude 输出 excel 一站式实现
人工智能·ai·excel·豆包·ai导出鸭
Am-Chestnuts3 天前
DeepSeek 表格如何导出 Word/Excel:Markdown 表格、CSV 与 DS随心转方案对比
word·excel
城数派3 天前
2000-2026年我国省市县三级逐月NDVI数据(Shp/Excel格式)
excel
许彰午4 天前
74_Python自动化办公之Excel操作
python·自动化·excel
E_ICEBLUE4 天前
在 Python 中快速锁定 Excel 单元格与行列
python·安全·excel
Non-existent98720 天前
WPS批量清理单元格空白字符的4种方法-异常数字格式处理-实战
excel·wps
Channing Lewis21 天前
PHP 解析 Excel 的那些坑:一次“行号错位”引发的数据丢失
开发语言·php·excel