Spreadsheet - Template Marker on JSON data

Hello,

I'm saving my spreadsheet as a JSON in my database and would like to apply some template marker to it.

Is it possible to either :

- To open the workbook directly from a JSON and apply the markers

or

- In .NET transform the JSON file to en Excel one and then apply the markers

Thank you, 
Tuan

9 Replies 1 reply marked as answer

SP Sangeetha Priya Murugan Syncfusion Team February 2, 2021 11:22 AM UTC

Hi Tuan Ardouin, 
 
Thank you for contacting Syncfusion support. 
 
We have checked your reported requirement and we would like to let you know that it can be achievable in our spreadsheet by using the openFromJson and saveAsJson method. We have already demonstrated this in our knowledge base section itself.  
 
In this we have saved the spreadsheet data as jsonobject in database and open the saved jsonobject in spreadsheet. Please find the link below. 
 
 
Meanwhile, we can able to save the Jsondata as excel by using the ASP.NET workbook server side action (Open, Save). For more details, please refer the below link. 
 
 
To Add the template markers in Excel file, please refer the below link. 
 
 
Could you please check the above links and get back to us, if you need any further assistance on this. 
 
Regards, 
Sangeetha M 


Marked as answer

TA Tuan Ardouin February 2, 2021 02:28 PM UTC

I don't understand where SaveSettings comes from.

Is it possible to create a SaveSettings from a Json string or file ?

Something like :

string jsonString = Encoding.ASCII.GetString(memStream.ToArray());

SaveSettings saveSettings = jsonString;

Stream fileStream = Workbook.Save<Stream>(jsonString);


SP Sangeetha Priya Murugan Syncfusion Team February 3, 2021 11:01 AM UTC

Hi Tuan Ardouin, 
 
Thank you for the update. 
 
We have checked your reported queries and we would let you know that the list of below dependencies are required to use the EJ2 Spreadsheet in your application. 
 
1. Syncfusion.EJ2  
 
2. Syncfusion.EJ2.Spreadsheet 
 
3. Syncfusion.Compression.Base 
 
4. Syncfusion.XlsIO.Base 
 
For more details regarding your requirement, Please refer the below links. 
 
 
 
 
Could you please check the above links and get back to us, if you need any further assistance on this. 
 
Regards, 
Sangeetha M 



TA Tuan Ardouin February 3, 2021 11:03 AM UTC

Hello,

Thanks for your reply but I think you responded to my previous message that I have since deleted.

I'm trying to create a workBook object directly from a JSON string know.

Tuan


SP Sangeetha Priya Murugan Syncfusion Team February 4, 2021 05:33 AM UTC

 
Hi Tuan Ardouin,  
  
Thank you for the update.  
 
We have checked your reported query and we would suggest you to refer the below knowledge base link. It converts the spreadsheet saved JsonObject to excel file in server side, please refer the below link. 
 
 
Could you please check the above link and get back to us, if you need any further assistance on this. 
 
Regards, 
Sangeetha M 



TA Tuan Ardouin February 4, 2021 01:20 PM UTC

Hello,

I followed your different links but I always end up getting this import error :

The type 'ExcelEngine' exists in both 'Syncfusion.XlsIO.Base ... and Syncfusion.XlsIO.Portable ...

My package list : 

<PackageReference Include="Syncfusion.Compression.Base" Version="18.4.0.41" />
<PackageReference Include="Syncfusion.DocIO.Net.Core" Version="18.2.0.48" />
<PackageReference Include="Syncfusion.EJ2" Version="16.3.0.29" />
<PackageReference Include="Syncfusion.EJ2.Spreadsheet.AspNet.Core" Version="18.4.0.41" />
<PackageReference Include="Syncfusion.EJ2.WordEditor.AspNet.Core" Version="18.2.0.47" />
<PackageReference Include="Syncfusion.XlsIO.Base" Version="16.4.0.53" />
<PackageReference Include="System.Json" Version="4.7.1" />

Imports :

using Syncfusion.EJ2;
using Syncfusion.EJ2.Spreadsheet;
using Syncfusion.Compression;
using Syncfusion.XlsIO;

Am I doing something wrong ?


SP Sangeetha Priya Murugan Syncfusion Team February 5, 2021 07:30 AM UTC

Hi Tuan Ardouin, 
 
Thank You for your update. 
 
We have checked your reported issue based on your provided code example and we would like to let you know that you have referred some older version for syncfusion packages. So, we would suggest you to use the latest version for all syncfusion nuget packages in your end.  
 
Could you please check the above details and kindly get back to us, if you still getting the same issue or need further assistance on this. 
 
Regards, 
Sangeetha M 



TA Tuan Ardouin February 5, 2021 05:57 PM UTC

Hello, 

It's fixed. Thanks for your help !

Tuan


SP Sangeetha Priya Murugan Syncfusion Team February 8, 2021 08:21 AM UTC

Hi Tuan Ardouin,  
  
Thank you for your update. 
 
We are happy to hear that your issue has been resolved. Kindly get back to us if you need any further assistance. 
 
Regards, 
Sangeetha M 


Loader.
Up arrow icon