eriezelagera

Create Excel - Testing Detail Placeholder

Jul 29th, 2014
426
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.93 KB | None | 0 0
  1. import java.util.*;
  2.  
  3. /**
  4.  * Sample test for Creating Excel with Detail Placeholder.
  5.  * @author Erieze
  6.  */
  7. public class TestCreateExcel {
  8.  
  9.     public TestCreateExcel() {
  10.         Map<String, Object> map = new HashMap<String, Object>();
  11.         ArrayList<ArrayList> students = new ArrayList<>();
  12.         ArrayList<String> info = new ArrayList<>();
  13.        
  14.         info.add("Juan dela Cruz");
  15.         info.add("Manila");
  16.         students.add(info);
  17.        
  18.         info = new ArrayList<>();
  19.         info.add("John Doe");
  20.         info.add("America");
  21.         students.add(info);
  22.        
  23.         map.put("students", students);
  24.         map.put("msg", "Hello world!");
  25.        
  26.         CreateExcel create = new CreateExcel(System.getenv("HOME") + "/Desktop/template.xlsx", 0, null, "Sample 1", map);
  27.         create.execute();
  28.     }
  29.    
  30.     public static void main(String args[]) {
  31.         new TestCreateExcel();
  32.     }
  33.    
  34. }
Advertisement
Add Comment
Please, Sign In to add comment