2
Answers

How can i Create New word document in webbrowser control ?

Hi,


 I can able to open a word document with in the webbrowser control, now i want to create a new document with in the webbrowser. Let's say i opens abcd.doc word document i have a button like "New" when i click on the new document how can i create the new/balnk word document with in the webbrowser ??


Thanks.
Answers (2)
0
Vulpes
NA 98.3k 1.5m 12y
Try this:

import java.io.*;
import java.util.*;

public class Catalin
{
   public static void main(String[] args)
   {
       ArrayList<Integer> sumsList = new ArrayList<Integer>();

       try
       {
          BufferedReader br = new BufferedReader(new FileReader("catalin.txt"));
          String line;

          while ((line = br.readLine()) != null) 
          {
             String[] items = line.split(";");
             int number = Integer.parseInt(items[1]);
             int number2 = Integer.parseInt(items[2]);
             sumsList.add(number + number2);
          }

          br.close();
       }
       catch(IOException e)
       {
          System.out.println("I/O Error : " + e);
       }
       
       // convert ArrayList<Integer> to int[]
       int[] sumsArray = new int[sumsList.size()];
       for(int i = 0; i < sumsArray.length; i++) sumsArray[i] = sumsList.get(i);

       System.out.println("Line Sum");
       System.out.println("---- ---");

       for(int i = 0; i < sumsArray.length; i++)
       { 
          System.out.println((i + 1) + "     " + sumsArray[i]);
       }
   }
}