// Create a new workbook Workbook workbook = new Workbook(); // Get data from json file String jsonText = ""; try { InputStream stream = this.getResourceStream("json/DataBinding.json"); ByteArrayOutputStream result = new ByteArrayOutputStream(); byte[] buffer = new byte[1024]; int length; while ((length = stream.read(buffer)) != -1) { result.write(buffer, 0, length); } jsonText = result.toString("UTF-8"); } catch (IOException e) { e.printStackTrace(); } // jsonText content. // [ // {"Area": "North America","City": "Chicago","Category": "Consumer Electronics","Name": "Bose 785593-0050","Revenue": 92800}, // {"Area": "North America","City": "New York","Category": "Consumer Electronics","Name": "Bose 785593-0050","Revenue": 92800}, // {"Area": "South America","City": "Santiago","Category": "Consumer Electronics","Name": "Bose 785593-0050","Revenue": 19550} // ] IWorksheet worksheet = workbook.getActiveSheet(); worksheet.setDataSource(new JsonDataSource(jsonText)); // Save to an excel file workbook.save("JsonSource.xlsx");