// Create a new workbook Workbook workbook = new Workbook(); IWorksheet worksheet = workbook.getWorksheets().get(0); Object data = new Object[][]{ {"Luigi", "New York", new GregorianCalendar(1998, Calendar.APRIL, 8), "Blue", 67, 165}, {"Richard", "New York", new GregorianCalendar(1968, Calendar.JUNE, 8), "Blue", 67, 165}, {"Nia", "New York", new GregorianCalendar(1972, Calendar.JULY, 3), "Brown", 62, 134}, {"Jared", "New York", new GregorianCalendar(1964, Calendar.MARCH, 2), "Hazel", 72, 180}, {"Natalie", "Washington", new GregorianCalendar(1972, Calendar.AUGUST, 8), "Blue", 66, 163}, {"Damon", "Washington", new GregorianCalendar(1986, Calendar.FEBRUARY, 2), "Hazel", 76, 176}, {"Angela", "Washington", new GregorianCalendar(1993, Calendar.FEBRUARY, 15), "Brown", 68, 145} }; worksheet.getRange("A1:F7").setValue(data); worksheet.getRange("A:F").setColumnWidth(15); //Weight less than 72. worksheet.getRange("A1:F7").autoFilter(true, 4, "<72"); // Create a ssjson file stream FileOutputStream outputStream = null; try { outputStream = new FileOutputStream("HeadersAsData.ssjson"); } catch (FileNotFoundException e) { e.printStackTrace(); } workbook.toJson(outputStream); // Close the ssjson stream try { outputStream.close(); } catch (IOException e) { e.printStackTrace(); }