Skip to content

Commit e93d586

Browse files
committed
895338: Addressed the review comments.
1 parent 479ca0a commit e93d586

File tree

1 file changed

+4
-23
lines changed

1 file changed

+4
-23
lines changed

ej2-asp-core-mvc/spreadsheet/open-save.md

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,6 @@ The following code example shows how to open the spreadsheet data as base64 stri
251251

252252
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.
253253

254-
**Server Endpoint**:
255-
256254
```csharp
257255
public IActionResult Open([FromBody] FileOptions options)
258256
{
@@ -275,12 +273,10 @@ By default, the Spreadsheet control provides an option to browse files from the
275273
}
276274
```
277275

278-
**Client Side**:
279-
280276
```js
281277

282278
// Fetch call to server to load the Excel file.
283-
fetch('https://localhost:{{Your port number}}/Home/Open', {
279+
fetch('Home/Open', {
284280
method: 'POST',
285281
headers: {
286282
'Content-Type': 'application/json',
@@ -295,12 +291,7 @@ By default, the Spreadsheet control provides an option to browse files from the
295291

296292
```
297293

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.
299-
300-
```js
301-
// To open an Excel file from the server.
302-
fetch('https://localhost:{port number}/Home/Open')
303-
```
294+
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).
304295

305296
### External workbook confirmation dialog
306297

@@ -551,8 +542,6 @@ The following code example shows how to save the spreadsheet data as base64 stri
551542

552543
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.
553544

554-
**Client Side**:
555-
556545
```js
557546

558547
// 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
564553
formData.append('JSONData', JSON.stringify(json.jsonObject.Workbook));
565554
formData.append('PdfLayoutSettings', JSON.stringify({ FitSheetOnOnePage: false }));
566555
// Using fetch to invoke the save process.
567-
fetch('https://localhost:{{Your port number}}/Home/Save', {
556+
fetch('Home/Save', {
568557
method: 'POST',
569558
body: formData
570559
}).then((response) => {
@@ -574,8 +563,6 @@ By default, the Spreadsheet control saves the Excel file and downloads it to the
574563

575564
```
576565

577-
**Server Endpoint**:
578-
579566
```csharp
580567

581568
public string Save(SaveSettings saveSettings)
@@ -607,12 +594,7 @@ By default, the Spreadsheet control saves the Excel file and downloads it to the
607594

608595
```
609596

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.
611-
612-
```js
613-
//To save an Excel file to the server.
614-
fetch('https://localhost:{port number}/Home/Save')
615-
```
597+
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).
616598

617599
### Supported file formats
618600

@@ -651,7 +633,6 @@ To save the Spreadsheet document as an `xlsx, xls, csv, or pdf` file, by using `
651633
{% endif %}
652634

653635

654-
655636
## Server Configuration
656637

657638
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

Comments
 (0)