poi deals with ole2 iwant to deal with msword 2007

Ads

 
 

Share on Google+Share on Google+

bharathidasan
poi deals with ole2 iwant to deal with msword 2007
0 Answer(s)      4 years and 6 months ago
Posted in : Java Beginners

import java.io.*;

import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.hwpf.HWPFDocument; import org.apache.poi.hwpf.usermodel.CharacterRun; import org.apache.poi.hwpf.usermodel.Range; import org.apache.poi.poifs.filesystem.POIFSFileSystem;

public class WriteInDocument { public static void main(String[] args)throws IOException { File file = new File("C:\sample.docx"); POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream(file)); HWPFDocument doc = new HWPFDocument(fs); Range range =doc .getRange(); CharacterRun run = range.insertAfter("Hello World!"); run.setFontSize(2 * 18); run.setBold(true); run.setItalic(true); run.setCapitalized(true); OutputStream out = new FileOutputStream(new File("C:\new.rtf")); doc.write(out); out.flush(); out.close();

}

}

Ads
View Answers
Ads









Related Tutorials/Questions & Answers:
poi deals with ole2 iwant to deal with msword 2007
poi deals with ole2 iwant to deal with msword 2007  import java.io.*; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.hwpf.HWPFDocument; import org.apache.poi.hwpf.usermodel.CharacterRun; import
msword
msword  what is the product key of msword 2007
Advertisements
Same day travel deals
Same day travel deals  Hi, Can anyone compare same day travel deals with different travel packages? Thanks
how to deal with exceptions in servlet
how to deal with exceptions in servlet  plz give me the reply
Version of poi>poi dependency
List of Version of poi>poi dependency
why java program not run with msword editor
why java program not run with msword editor  if java program write in MICROSOFT WORD then why they are not run with jdk
Access 2007 database connectivity
Access 2007 database connectivity  i design an application form that have two JComboBox as the label(source,destination) and two JButton save... source and destination. pls tell me the code of connectivity with access 2007
Web robot to find the best deal
Web robot to find the best deal  Build a Web robot that looks at certain retailers to find the best deal. For example, if you want to buy a textbook... retiles (e.g. amazon.com and others) to compare prices and find the best deal
How to deal with Crisis management
Crisis management is the process by which an organization deals with the threat... or system instantly and it is necessary to deals with patiently... party can also be a victim of sudden crisis. The main thing is to how to deal
Version of poi>poi-contrib-2.5.1-final dependency
List of Version of poi>poi-contrib-2.5.1-final dependency
Version of poi>poi-scratchpad-2.5.1-final dependency
List of Version of poi>poi-scratchpad-2.5.1-final dependency
Version of poi>poi-contrib dependency
List of Version of poi>poi-contrib dependency
Version of poi>poi-scratchpad dependency
List of Version of poi>poi-scratchpad dependency
edit msword file - using java - Java Beginners
edit msword file - using java  I want to edit ms word file. That is input file font style is times new romen and font size is 12. I want the output file font style is bookman old style and size is 20. How to possible java
POI APPLICATION
POI APPLICATION  HI .. I WANT POI (JAVA POI)SOURCE CODE FOR CONVERT EXCEL TO TEXT FORMAT ? EXPLAIN IN DETAIL PLEASE
POI Tutorial
POI Tutorial  Hi, How to access the Excel file in Java? I have heard about POI in Java. Can anyone share me the url of the tutorial? Thanks   Hi, Yes you can use the POI api for reading and writing Excel file. Check
Artifacts of poi
List of Artifacts of poi maven depenency
how to connect xlsx(2007 excel) - JDBC
how to connect xlsx(2007 excel)  i am not able connect to office 2007 excel file from jdbc
Version of poi>poi-contrib-2.5-final dependency
List of Version of poi>poi-contrib-2.5-final dependency
Version of poi>poi-scratchpad-2.5-final dependency
List of Version of poi>poi-scratchpad-2.5-final dependency
Need runescape 2007 gold but hate phone confirmation?
Need runescape 2007 gold but hate phone confirmation?  Do you think it is really boring to be confirmed when buying runescape 2007 gold pay by paypal? Now, Rs2sale.com solves this problem, you can buy cheapest rs 07 gold without
Maven Dependency poi >> 1.8.0-dev-20020919
You should include the dependency code given in this page to add Maven Dependency of poi >> poi version1.8.0-dev-20020919 in your project
Maven Dependency poi >> 2.0-final-20040126
You should include the dependency code given in this page to add Maven Dependency of poi >> poi version2.0-final-20040126 in your project
Maven Dependency poi >> 2.5.1
You should include the dependency code given in this page to add Maven Dependency of poi >> poi version2.5.1 in your project
Maven Dependency poi >> 2.5.1-final-20040804
You should include the dependency code given in this page to add Maven Dependency of poi >> poi version2.5.1-final-20040804 in your project
Maven Dependency poi >> 2.5-final-20040302
You should include the dependency code given in this page to add Maven Dependency of poi >> poi version2.5-final-20040302 in your project
Maven Dependency poi >> 3.0.1-FINAL
You should include the dependency code given in this page to add Maven Dependency of poi >> poi version3.0.1-FINAL in your project
Maven Dependency poi >> 3.0.2-beta1
You should include the dependency code given in this page to add Maven Dependency of poi >> poi version3.0.2-beta1 in your project
Maven Dependency poi >> 3.0.2-beta2
You should include the dependency code given in this page to add Maven Dependency of poi >> poi version3.0.2-beta2 in your project
Maven Dependency poi >> 3.0.2-FINAL
You should include the dependency code given in this page to add Maven Dependency of poi >> poi version3.0.2-FINAL in your project
Maven Dependency poi >> 3.0-alpha3
You should include the dependency code given in this page to add Maven Dependency of poi >> poi version3.0-alpha3 in your project

Ads

 
Advertisement null

Ads