Hi,
I am opening various external-URL excel-files on initial-load (more than 100 spreadsheets) and it's taking time for the open URL call for each of the spreadsheet. how can I fix it?
sometimes even it is not loading because I am having more than 100 spreadsheets so it is taking time.
Please help me on this.
Thanks in advance,
Vaishali Jain
Hi Vaishali Jain,
Currently, we are validating your reported query at our end
and will update you with further details soon. We appreciate your patience
until then.
ok thanks Janakiraman Sakthivel,
one more thing. I don't wanna load spreadsheet every time user landed on the page because there are too many spreadsheets. I wanna store the data and load it only when new excel data will come.
Waiting for your response
thanks,
Vaishali Jain
Hi Vaishali Jain,
We have validated your reported query and reviewed the shared codes.
However, we couldn't understand and having doubts about the scenario in which
you are encountering the reported problem. Therefore, could you please clarify
whether you are experiencing the reported problem while trying to open a
single Excel file with 100 sheets or while opening 100 different
Excel files? Please provide more details about the exact scenario in which
you are encountering the problem.
If possible, could you please share a dummy Excel file that replicates
the problem you're facing, along with the relevant data? Or provide details
about the features used in the Excel file, as well as the number of rows and
columns involved. This information would be helpful for us to proceed
further on our end.
Also, we have noticed that you are using the created
and dataBound
events in your shared code. Therefore, could you please share the functions
for these events and provide your complete client-side code for validation?
Additionally, we have noticed that you are using the
hosted Syncfusion URL for open
actions in your shared codes. We would like to let you know that the hosted Syncfusion URLs is only for demo purposes.
Consequently, we have used hosted Syncfusion online URLs
for open and save actions in our online demo samples.
For development purposes, we recommend that you create your own local service.
Using a local service will improve the performance of open and save actions.
For your reference, we have attached a local Web API service.
Service sample: Please see the
attachment.
After taking the local service from the attachment, please follow the below steps to launch the local service on your
end.
For your convenience, we have attached the open and save code snippets of local service below.
Code snippet:
|
[HttpPost] [Route("Open")] public IActionResult Open([FromForm]IFormCollection openRequest) { OpenRequest open = new OpenRequest(); open.File = openRequest.Files[0]; return Content(Workbook.Open(open)); } //Save method [HttpPost] [Route("Save")] public IActionResult Save([FromForm]SaveSettings saveSettings) { return Workbook.Save(saveSettings); } |
After, launching the local service, you need to update the open and save URL in
the Client Side sample like in the below code snippet,
|
openUrl= 'https://localhost:{port number}/api/spreadsheet/open' saveUrl= 'https://localhost:{port number}/api/spreadsheet/save'
openUrl= 'https://localhost:44354/api/spreadsheet/open' saveUrl= 'https://localhost:44354/api/spreadsheet/save' |
Note: Launch the service before running the client-side sample.
For more
information regarding the Open/Save in Spreadsheet, please refer the below
documentation,
Documentation link: https://ej2.syncfusion.com/angular/documentation/spreadsheet/open-save
KB link: https://www.syncfusion.com/kb/13200/how-to-remove-trial-version-tab-created-in-spreadsheet
Local service available in below GitHub location also:
https://github.com/SyncfusionExamples/EJ2-Spreadsheet-WebServices/
Kindly check your reported problem using the local service. If you
continue to face the same problem even after using a local service, please get
back to us with the requested details mentioned above.
Attachment: WebAPI_74981c44.zip
Hi,
can I create this service in angular instead of asp.net as in front end I am using angular ?
Thanks,
vaishali
Hi Vaishali Jain,
Currently, we don’t have support for import and export actions in Client side. We have developed the import and export server actions in the .NET framework with C# programming only.
On our server side, we utilize our Syncfusion XLSIO library to convert Excel files to JSON format for opening in the Spreadsheet, and vice versa, to convert JSON data back into Excel files for saving which was available in .NET framework only. So that, we are unable to provide import and export actions in client side.
Also, we would like to let you know that we have already logged a feature request for performing the Open and Save action on the client side. It will be available in any of our upcoming releases. You can communicate and track the status of the feature using the below link from our feedback portal.
Feedback Link: https://www.syncfusion.com/feedback/18431/need-to-provide-support-for-client-side-import-export-in-spreadsheet.
Alternatively, we can also host and run our Spreadsheet-oriented service as a Docker image. Utilizing a Docker image necessitates only a simple and basic Docker environment with minimal commands to effortlessly host and run our service. We have already recommended this solution to all our existing customers who have approached us with similar requirements, and they have successfully adopted this Docker image solution.
You can utilize the below service and use it for Spreadsheet Open and Save services, by pulling the spreadsheet docker image and following the steps from the URL mentioned below.
Spreadsheet docker image:
https://hub.docker.com/r/syncfusion/spreadsheet-server
Kindly, check the above details and get back to us for
further clarifications.