You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ej2-asp-core-mvc/spreadsheet/open-save.md
+4-23Lines changed: 4 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -251,8 +251,6 @@ The following code example shows how to open the spreadsheet data as base64 stri
251
251
252
252
By default, the Spreadsheet control provides an option to browse files from the local file system and open them within the control. If you want to load an Excel file located on a server, you need to configure the server endpoint to fetch the Excel file from the server location, process it using `Syncfusion.EJ2.Spreadsheet.AspNet.Core`, and send it back to the client side as `JSON data`. On the client side, you should use the `openFromJson` method to load that `JSON data` into the Spreadsheet control.
@@ -275,12 +273,10 @@ By default, the Spreadsheet control provides an option to browse files from the
275
273
}
276
274
```
277
275
278
-
**Client Side**:
279
-
280
276
```js
281
277
282
278
// Fetch call to server to load the Excel file.
283
-
fetch('https://localhost:{{Your port number}}/Home/Open', {
279
+
fetch('Home/Open', {
284
280
method:'POST',
285
281
headers: {
286
282
'Content-Type':'application/json',
@@ -295,12 +291,7 @@ By default, the Spreadsheet control provides an option to browse files from the
295
291
296
292
```
297
293
298
-
You can find the server endpoint code to fetch and process the Excel file in this [attachment](https://www.syncfusion.com/downloads/support/directtrac/general/ze/WebApplication1_(1)-880363187). After launching the server endpoint, you need to update the URL on the client side sample as shown below.
You can find the server endpoint code to fetch and process the Excel file in this [attachment](https://www.syncfusion.com/downloads/support/directtrac/general/ze/WebApplication1_(1)-880363187).
304
295
305
296
### External workbook confirmation dialog
306
297
@@ -551,8 +542,6 @@ The following code example shows how to save the spreadsheet data as base64 stri
551
542
552
543
By default, the Spreadsheet control saves the Excel file and downloads it to the local file system. If you want to save an Excel file to a server location, you need to configure the server endpoint to convert the spreadsheet data into a file stream and save it to the server location. To do this, first, on the client side, you must convert the spreadsheet data into `JSON` format using the `saveAsJson` method and send it to the server endpoint. On the server endpoint, you should convert the received spreadsheet `JSON` data into a file stream using `Syncfusion.EJ2.Spreadsheet.AspNet.Core`, then convert the stream into an Excel file, and finally save it to the server location.
553
544
554
-
**Client Side**:
555
-
556
545
```js
557
546
558
547
// Convert the spreadsheet workbook to JSON data.
@@ -564,7 +553,7 @@ By default, the Spreadsheet control saves the Excel file and downloads it to the
fetch('https://localhost:{{Your port number}}/Home/Save', {
556
+
fetch('Home/Save', {
568
557
method:'POST',
569
558
body: formData
570
559
}).then((response) => {
@@ -574,8 +563,6 @@ By default, the Spreadsheet control saves the Excel file and downloads it to the
574
563
575
564
```
576
565
577
-
**Server Endpoint**:
578
-
579
566
```csharp
580
567
581
568
publicstringSave(SaveSettingssaveSettings)
@@ -607,12 +594,7 @@ By default, the Spreadsheet control saves the Excel file and downloads it to the
607
594
608
595
```
609
596
610
-
You can find the server endpoint code to save the spreadsheet data as an Excel file in this [attachment](https://www.syncfusion.com/downloads/support/directtrac/general/ze/WebApplication1_(1)-880363187). After launching the server endpoint, you need to update the URL on the client side sample as shown below.
You can find the server endpoint code to save the spreadsheet data as an Excel file in this [attachment](https://www.syncfusion.com/downloads/support/directtrac/general/ze/WebApplication1_(1)-880363187).
616
598
617
599
### Supported file formats
618
600
@@ -651,7 +633,6 @@ To save the Spreadsheet document as an `xlsx, xls, csv, or pdf` file, by using `
651
633
{% endif %}
652
634
653
635
654
-
655
636
## Server Configuration
656
637
657
638
In Spreadsheet component, import and export operation processed in `server-side`, to use importing and exporting in your projects, it is required to create a server with any of the following web services.
0 commit comments