1

These are my classes:

public class Rootobject

{
   public Test[] tests { get; set; }
   public Pagination pagination { get; set; }
}

public class Pagination    
{
   public int total_records { get; set; }    
   public int total_pages { get; set; }    
   public int current_page { get; set; }
}

public class Test
{

   public string id { get; set; }
   public string num { get; set; }
   public string name { get; set; }
   public DateTime created { get; set; } 
}

and my code to deserialise:

var Jsonobject = JsonConvert.DeserializeObject<Rootobject>(jsonText);

Rootobject _obj = (Rootobject)Jsonobject; 


var result = (
from Item in Jsonobject.tests
select new Test    
{
  id = Item.id,
  num = Item.num,
  name = Item.name,
  created = Item.created,     
}).ToList();

The next step I have is to populate these into excel. How do I do that? I am a beginner and need some guidance please. Can anyone help me with any suggestions. Thank you.

Cam Bruce
  • 5,632
  • 19
  • 34
fresher123
  • 43
  • 1
  • 5
  • 1
    A Google or SO search would help you: http://stackoverflow.com/questions/23041021/how-to-write-some-data-to-excel-file-xlsx – Mikanikal Jun 17 '16 at 17:32

0 Answers0