Parse Excel for JSON

I would like to know if excel can be parsed for json. And if possible, what is the structure of excellence to make this possible. Is there an application or something ??

I have a JSON structure http://pastie.org/2760828 And I need to insert 500 products, and I would like to insert them into excel and analyze them.

+4
source share
2 answers

You can do it as follows:
1) Convert your excelsheet to datatable first
2) And then convert your datatable to json as below:

1) convert excel sheet to datatable

string ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=G:\school pro\schools3.xlsx; Extended Properties=Excel 5.0"; StringBuilder stbQuery = new StringBuilder(); stbQuery.Append("SELECT top 10 * FROM [A1:M98]"); OleDbDataAdapter adp = new OleDbDataAdapter(stbQuery.ToString(), ConnectionString); DataTable dtSchools = new DataTable(); adp.Fill(dtSchools); 

2) convert datatable to json

 Newtonsoft.Json.JsonConvert.SerializeObject(dtSchools) 
+6
source

ExcelToJSON converts Excel sheet to JSON format

http://www.exceltojson.com/

-2
source

All Articles