跳到主要内容

如何在Excel中将每一行导出/保存为文本文件?

通常,我们可以轻松地将工作表另存为单独的文本文件,但是如何在 Excel 中将单行导出并保存为文本文件呢?以及如何将每一行导出并保存为单独的文本文件?本文将介绍 Kutools for Excel 的实用程序来轻松解决这些问题。

使用 Kutools for Excel 导出/保存一行作为文本文件

使用 Kutools for Excel 将每一行导出/保存为文本文件

在Excel中轻松批量保存每个工作表为单独的PDF / CSV /文本文件或工作簿

通常,我们可以使用“另存为”功能将活动工作表另存为单独的 .pdf 文件、.txt 文件或 .csv 文件。但是Excel的Kutools 拆分工作簿 实用程序可以帮助您轻松地将每个工作簿另存为单独的PDF / CSV /文本文件或Excel中的工作簿。

广告拆分工作簿文字


Kutools for Excel的 将范围导出到文件 实用程序可以将范围保存为文本文件、csv 文件或 html 文件等。因此,我们可以应用此实用程序将整行导出为 Excel 中的文本文件。

Kutools for Excel - 包含 300 多个 Excel 基本工具。 享受全功能 30 天免费试用,无需信用卡! 现在下载!

1.选择要另存为文本文件的整行,然后单击 Kutools 加 > 进出口 > 将范围导出到文件。 参见下面的截图:

2.在打开的将范围导出到文件对话框中,选中 Unicode文本 选项,然后单击浏览按钮 在...旁边 保存目录 框。

3. 在弹出的选择导出文件的目录对话框中,选择要保存文本文件的文件夹,然后单击 OK 按钮。

4。 点击 Ok 当它返回到 将范围导出到文件 对话框。

笔记:

1.如果成功保存后要打开文本文件,可以检查 导出后打开文件 将范围导出到文件对话框中的选项。

2.如果需要将多行保存为单独的文本文件,则必须重复多次这些步骤才能将每一行保存为单独的文本文件。 为了轻松将每一行保存为单独的文本文件,请继续查看以下方法。

Kutools for Excel - 使用 300 多种基本工具增强 Excel 功能。 享受全功能 30 天免费试用,无需信用卡! 立即行动吧!


实际上,如果您安装了 Kutools for Excel,我们可以按其将每一行拆分为一个新工作表 拆分数据 实用程序,然后应用其 拆分工作簿 实用程序将这些工作表另存为Excel中的单个文本文件。

Kutools for Excel - 包含 300 多个 Excel 基本工具。 享受全功能 30 天免费试用,无需信用卡! 现在下载!

1.选择将每一行保存为文本文件的范围,然后单击 Kutools 加 > 拆分数据.

2.在“将数据拆分为多个工作表”对话框中,选中 固定行 选项和类型 1 在下面的框中,在 规则 下拉菜单,然后单击 Ok 按钮。

 

现在,每一行都被拆分为带有标题行的新工作簿的新工作表。 如果您不需要新表格中的标题行,请取消选中 我的数据有标题 选项。

3.在新工作表中,单击 Kutools 加 > 工作簿 > 拆分工作簿.

4.在打开的“拆分工作簿”对话框中,选中 保存类型 选项,选择 Unicode文本(* .txt) 从下面的下拉列表中,然后单击 分裂 按钮。

doc将每一行导出为文本01

笔记:

(1)如果您不需要将隐藏的工作表另存为文本文件,请检查 跳过隐藏的工作表 选项。

(2)如果您不需要将空白工作表另存为文本文件,请检查 跳过空白工作表 选项。

5.在文件夹中指定要将文本文件保存到的文件夹。 选择“文件夹” 对话框,然后单击 选择“文件夹” 按钮。

如果有很多工作表,您将另存为文本文件,则将花费一些时间来拆分。

然后,您将看到每一行被拆分并另存为文本文件到指定的文件夹中。

Kutools for Excel - 使用 300 多种基本工具增强 Excel 功能。 享受全功能 30 天免费试用,无需信用卡! 立即行动吧!


 

Kutools for Excel:超过 300 个方便的工具触手可及! 立即开始 30 天免费试用,没有任何功能限制。 立即下载!

最佳办公生产力工具

🤖 Kutools 人工智能助手:基于以下内容彻底改变数据分析: 智能执行   |  生成代码  |  创建自定义公式  |  分析数据并生成图表  |  调用 Kutools 函数...
热门特色: 查找、突出显示或识别重复项   |  删除空白行   |  合并列或单元格而不丢失数据   |   不使用公式进行四舍五入 ...
超级查询: 多条件VLookup    多值VLookup  |   跨多个工作表的 VLookup   |   模糊查询 ....
高级下拉列表: 快速创建下拉列表   |  依赖下拉列表   |  多选下拉列表 ....
列管理器: 添加特定数量的列  |  移动列  |  切换隐藏列的可见性状态  |  比较范围和列 ...
特色功能: 网格焦点   |  设计图   |   大方程式酒吧    工作簿和工作表管理器   |  资源库 (自动文本)   |  日期选择器   |  合并工作表   |  加密/解密单元格    按列表发送电子邮件   |  超级筛选   |   特殊过滤器 (过滤粗体/斜体/删除线...)...
前 15 个工具集12 文本 工具 (添加文本, 删除字符,...)   |   50+ 图表 类型 (甘特图,...)   |   40+ 实用 公式 (根据生日计算年龄,...)   |   19 插入 工具 (插入二维码, 从路径插入图片,...)   |   12 转化 工具 (小写金额转大写, 货币兑换,...)   |   7 合并与拆分 工具 (高级组合行, 分裂细胞,...)   |   ... 和更多

使用 Kutools for Excel 增强您的 Excel 技能,体验前所未有的效率。 Kutools for Excel 提供了 300 多种高级功能来提高生产力并节省时间。  单击此处获取您最需要的功能...

产品描述


Office Tab 为 Office 带来选项卡式界面,让您的工作更加轻松

  • 在Word,Excel,PowerPoint中启用选项卡式编辑和阅读,发布者,Access,Visio和Project。
  • 在同一窗口的新选项卡中而不是在新窗口中打开并创建多个文档。
  • 每天将您的工作效率提高50%,并减少数百次鼠标单击!
Comments (11)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi

I have a file with roughly 20,000 rows and these rows need to be saved as individual notepad files with a name from another column in the same file. Could you please let me know if this is possible.

Example:-
Name Text
Nm1 test file content - test 1
Nm2 test file content - test 2
Nm3 test file content - test 3

So for the table above in Excel, I would like 3 files created with 1st file saved as 'Nm1.txt' and content 'test file content - test 1'.

Could any of you please help.

Thanks
Divya
This comment was minimized by the moderator on the site
Hi there,

Are the names in the column in a regular way like Nm1, Nm3?
You cannot retrive name from a column, but you can create the names in a regular way. For example, when you click on Kutools Plus > Split Data, you can select Sequence Numbers in the Rules drop-down list (No. 2) under the New worksheets name section. And then add certain text in the Prefix and/ or suffix box.
https://cdn.extendoffice.com/images/stories/doc-excel/export-each-row-as-text/doc-export-each-row-as-text-6.png

For example, I select Sequence Numbers and enter Name- in the Prefix box, I will get the names of the text files like this: Name-1, Name-2, and so on.

Amanda
This comment was minimized by the moderator on the site
I am sadly getting the following error when trying to do this: "Access violation at address 0000000002D1F21B in module 'PaneforKutools64.dll'. Read of address 0000000101010060."
I may have gotten the number of zeros wrong as I cannot copy and paste... but what should I do?
This comment was minimized by the moderator on the site
Hi there,

Could you please advice which steps did you follow and then got wrong?
Please attach screenshots if possible.

Thanks in advance.

Amanda
This comment was minimized by the moderator on the site
Hello, Can I ask using a Kutools plus. When I use 'Workbook->Split Workbook, how to save text file that is type of 'utf-8'?
This comment was minimized by the moderator on the site
Hi tae-woo,
Thanks for your comment. At present Kutools supports to save worksheets as Unicode text files, CSV, Workbooks, PDF. Perhaps, Kutools will support to save worksheets as UTF-8 text files in future.
This comment was minimized by the moderator on the site
각각의 행을 각각의 텍스트 파일로 저장할 수 있는 방법은 무엇인지요?
This comment was minimized by the moderator on the site
this program saves text file with unicode encoding...but i want to save it with utf8....i dont know how...please help me
This comment was minimized by the moderator on the site
Hi,
Kutools for Excel only supports to save as Unicode text. If you prefer to UTF8 text, I am afraid you need to save each row manually one by one, or apply VBA code.
This comment was minimized by the moderator on the site
I really appreciate tou.....this program is very helpfull to me
This comment was minimized by the moderator on the site
Sir, I want seclect perticuler Range like colom A and B , if i salect A and B in One worksheet then autonaticalyy A and B salected in Each worksheet and Now "Export Range " salect for all worksheet and convet as TXT file according there currect Sheet Name
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations