How to create own API to convert XML file to JSON

Right now we are opening XML through this openURL "https://ej2services.syncfusion.com/production/web-services/api/spreadsheet/open" but we want to make our own API to get WORKBOOK from C# web API. Is it possible to make own API, if it is than please can you help us out?

3 Replies 1 reply marked as answer

MV Madhan Venkateshan Syncfusion Team July 13, 2020 11:14 AM UTC

Hi Prajwal Deep Bhandari, 
 
Good day to you. 
 
Yes, you can use your own API for opening excel by using ‘Syncfusion.EJ2.Spreadsheet.AspNet.Core’ package, we have prepared an API service for your requirement, please refer the below code snippets and service link. 
 
[Route("api/[controller]")] 
    [ApiController] 
    public class SpreadsheetController : ControllerBase 
    { 
        [HttpPost] 
        [Route("Open")] 
        public IActionResult Open(IFormCollection openRequest) 
        { 
            OpenRequest open = new OpenRequest(); 
            open.File = openRequest.Files[0]; 
            return Content(Workbook.Open(open)); 
        } 
    } 
 
 
 
 
Regards, 
Madhan V 


Marked as answer

CH Christian replied to Madhan Venkateshan July 30, 2021 09:38 PM UTC

I have a question, there is a way to  create my own API but with Java



AS Aravinthan Seetharaman Syncfusion Team August 3, 2021 03:49 AM UTC

Hi Christian, 
 
We have checked your query. And we would like to let you know that we don’t have support that JAVA as backend service for import/export action. And we are using the XLSIO library for open/save action and we have already logged the feedback for this support. Please find the link below.  
 
 
Regards, 
Aravinthan S 


Loader.
Up arrow icon