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

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

相关推荐
蓝创工坊Blue Foundry11 小时前
PaddleOCR 本地部署教程:小模型 OCR 如何完成字段提取到 Excel
pdf·自动化·ocr·excel·paddlepaddle·paddle
wujian831113 小时前
怎么用AI做excel表格 AI导出鸭来救场
人工智能·ai·excel·豆包·deepseek·ai导出鸭
用户2986985301413 小时前
React 前端处理 Excel 工作表复制的技术实践
javascript·react.js·excel
蓝创工坊Blue Foundry1 天前
个人藏书太多怎么整理?用 OCR 字段提取汇总成电子书目
pdf·ocr·excel·文心一言·paddlepaddle·paddle
蓝创工坊Blue Foundry2 天前
扫描件批量转 Excel:先确认要整表还原还是字段汇总
python·pdf·ocr·excel
Dylan的码园2 天前
从Excel到数据库:数据分析全流程与Kettle ETL实战指南
数据库·数据分析·excel
元Y亨H2 天前
Pandas 解析 Excel 导致的内存溢出(MemoryError)
python·excel
姜小二2 天前
QAxObject实现读写excel
嵌入式硬件·excel
E_ICEBLUE3 天前
Python 拆分 Excel 文件:使用 Spire.XLS 实现按工作表、行、列和条件拆分
python·excel
蓝创工坊Blue Foundry3 天前
批量提取图片中的数字:怎样整理成一张可核对的 Excel
python·ai·ocr·excel·paddlepaddle