In this example, you will learn how to convert text to Word file.In this example, you will learn how to convert text to Word file.
In this example, You will learn how to convert text to word file. Here, we are going to discuss about the conversion of text to word file.
The following program uses two constructors for converting text to word file. This program converts the text to word file by using FileOutputStream("TextToWord.doc"). This program writes the content in word file using write() method of OutputStreamWriter object.
Here is the code of this program:
Output of this program.