//create a new workbook var workbook = new GrapeCity.Documents.Excel.Workbook(); //ToJson&FromJson can be used in combination with spreadjs product //Document Solutions for Excel import an excel file. //change the path to real source file path. string source = "source.xlsx"; workbook.Open(source); //Document Solutions for Excel export to a json string. var jsonstr = workbook.ToJson(); //use the json string to initialize spread.sheets product. //spread.sheets will show the excel file contents. //spread.sheets product export a json string. //Document Solutions for Excel use the json string to initialize. workbook.FromJson(jsonstr); //Document Solutions for Excel export workbook to an excel file. //change the path to real export file path. string export = "export.xlsx"; workbook.Save(export);
' Create a new Workbook Dim workbook As New Workbook 'ToJson&FromJson can be used in combination with spreadjs product 'Document Solutions for Excel import an excel file. 'change the path to real source file path. Dim source = "source.xlsx" workbook.Open(source) 'Document Solutions for Excel export to a json string. Dim jsonstr = workbook.ToJson() 'use the json string to initialize spread.sheets product. 'spread.sheets will show the excel file contents. 'spread.sheets product export a json string. 'Document Solutions for Excel use the json string to initialize. workbook.FromJson(jsonstr) 'Document Solutions for Excel export workbook to an excel file. 'change the path to real export file path. Dim export = "export.xlsx" workbook.Save(export)