将.doc文件转换为.txt文件 [英] Convert the .doc file into .txt file

查看:83
本文介绍了将.doc文件转换为.txt文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好

对于我的应用程序,我想将.doc文件(MS Word)转换为

.txt文件(文本)。所有这些都说使用(文件)另存为方法来做到这一点。但我想在Unix中使用java转换文件。怎么可能,有助于解决这个问题。

是否有任何预先设定的工具可以做到这一点。


在此先感谢,

Geethu。

Hello
For my Application i want to convert .doc file (MS Word) into the
.txt file (Text). All of as says to use the (file) Save As method to do it. But i want to convert the file in Unix Using java. How is it possible, help to solve this.
Is there is any predifined tool to do this.

Thanks in Advance,
Geethu.

推荐答案

您需要找到确切存储.doc文件的描述(这不是一件简单的事情),然后删除所有标签文本周围.....


我不知道有任何非常简单的方法,尽管你可能会发现更广泛的网络上有人有一个公共解决方案,因为这似乎是一个经常出现的问题......
You would need to find a description of exactly how .doc files are stored (which is no simple matter), and then remove all the tags around the text.....

I''m not aware of any really simple way to do it, although you may find someone on the broader net has a public solution, because it seems to be a problem that comes up quite often....



你好

我的申请表我想将.doc文件(MS Word)转换为

.txt文件(文本)。所有这些都说使用(文件)另存为方法来做到这一点。但我想在Unix中使用java转换文件。怎么可能,有助于解决这个问题。

是否有任何预先设定的工具可以做到这一点。


在此先感谢,

Geethu。
Hello
For my Application i want to convert .doc file (MS Word) into the
.txt file (Text). All of as says to use the (file) Save As method to do it. But i want to convert the file in Unix Using java. How is it possible, help to solve this.
Is there is any predifined tool to do this.

Thanks in Advance,
Geethu.



您只能将word文档的文本部分读入文本文件。


使用poi包阅读.doc文件并使用FileWriter将其内容写入文件

You can only read text portions of the word document into the text file.

Use the poi package to read the .doc file and write its contents to a file using FileWriter



您只能将word文档的文本部分读入文本文件。


使用poi包读取.doc文件并使用FileWriter将其内容写入文件
You can only read text portions of the word document into the text file.

Use the poi package to read the .doc file and write its contents to a file using FileWriter



嗨r035198x,

我刚刚加入了这个论坛..

我正在使用POI将doc转换为txt ...但它只读取文件的第一行... 。我不知道哪里出了问题...你可以用一些代码片段来帮助我吗?

Thanx rupanu

Hi r035198x,
I have just joined this forum..
I am using POI for converting doc to txt...but it reads/wites only first line of the text....I don''t know where its going wrong...Can u help me out with some code snippets?
Thanx rupanu


这篇关于将.doc文件转换为.txt文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆