I want to generate excel sheet report. I having JSON object that i will be converted into JSONarray. Here is my sample code
JSONObject jsonObj = new JSONObject(jsonString.toString()); //convert to json object
JSONArray objSearchOrdersDto = jsonObj.getJSONArray("objSearchOrdersDto"); // convert to json array
for (int i = 0; i < objSearchOrdersDto.length(); ++i)
{
JSONObject rec = objSearchOrdersDto.getJSONObject(i);
int OrderNumber = rec.getInt("OrderNumber");
String strStatusType = rec.getString("strStatusType");
int OrgUnitId = rec.getInt("OrgUnitId");
System.out.println(OrderNumber+"\t"+strStatusType+"\t"+OrgUnitId); //want to excel file for this three field
}
Here i want to generate excel report only for these three field in for loop. Please give me suggestion.