Skip to content

Commit 883b51a

Browse files
Integrated latest changes at 07-01-2024 4:30:12 PM
1 parent 6b8defa commit 883b51a

37 files changed

+120
-189
lines changed

ej2-react-toc.html

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2415,15 +2415,9 @@
24152415
<li><a href="/ej2-react/spreadsheet/template">Templates</a></li>
24162416
<li>How To
24172417
<ul>
2418-
<li><a href="/ej2-react/spreadsheet/how-to/sort-a-range-by-custom-list">Sort a range by custom list</a></li>
2419-
<li><a href="/ej2-react/spreadsheet/how-to/print">Print the single/multiple sheets</a></li>
24202418
<li><a href="/ej2-react/spreadsheet/how-to/create-a-object-structure">Create a object structure </a></li>
24212419
<li><a href="/ej2-react/spreadsheet/how-to/change-active-sheet">Changing the active sheet while importing a file</a></li>
24222420
<li><a href="/ej2-react/spreadsheet/how-to/identify-the-context-menu-opened">Identify the context menu opened</a></li>
2423-
<li><a href="/ej2-react/spreadsheet/how-to/import-an-excel-document-using-file-uploader">Import an excel document using file uploader</a></li>
2424-
<li><a href="/ej2-react/spreadsheet/how-to/save-and-open-spreadsheet-data-as-base64-string">Save and open Spreadsheet data as Base64 string</a></li>
2425-
<li><a href="/ej2-react/spreadsheet/how-to/insert-sheet-programmatically-and-make-it-the-active-sheet">Insert a sheet programmatically and make it the active sheet</a></li>
2426-
<li><a href="/ej2-react/spreadsheet/how-to/get-filtered-rows">Get filtered rows</a></li>
24272421
</ul>
24282422
</li>
24292423
<li><a href="/ej2-react/spreadsheet/mobile-responsiveness">Mobile Responsiveness</a></li>

ej2-react/code-snippet/spreadsheet/readonly-cs1/app/app.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% raw %}
22
import * as React from 'react';
33
import { createRoot } from 'react-dom/client';
4-
import { SpreadsheetComponent, SheetsDirective, SheetDirective, RangesDirective, RangeDirective, ColumnsDirective, ColumnDirective } from '@syncfusion/ej2-react-spreadsheet';
4+
import { SpreadsheetComponent, SheetsDirective, SheetDirective, RangesDirective, RangeDirective, ColumnsDirective, ColumnDirective, RowsDirective, RowDirective, CellsDirective, CellDirective } from '@syncfusion/ej2-react-spreadsheet';
55
import { data } from './datasource';
66
function App() {
77
const spreadsheetRef = React.useRef(null);
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
86 Bytes
Loading
-557 Bytes
Loading
598 Bytes
Loading
-403 Bytes
Loading
-5.96 KB
Loading
-570 Bytes
Loading
-518 Bytes
Loading
20 Bytes
Loading
Loading
Loading
Loading

ej2-react/spreadsheet/filter.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,29 @@ When you want to reapply the filter after some changes happened in the rows. It
8585
The following errors have been handled for filtering,
8686
* *Out of range validation:* When the selected range is not a used range of the active sheet, it is considered as invalid and the out of range alert with the message `Select a cell or range inside the used range and try again` will be displayed. No filter will be performed if the range is invalid.
8787

88+
## Get the filtered rows
89+
90+
Filtering allows you to view specific rows in a spreadsheet while hiding the others. The [`allowFiltering`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/#allowfiltering) property allows you to enable or disable filtering functionality through the UI. You can also use the [`allowFiltering`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/#allowfiltering) property and [`applyFilter`](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/#applyfilter) method combination to filter data via code behind. The filtered rows can be identified by iterating through the row collection on the sheet and using the `isFiltered` property available in each row object.
91+
92+
The following code example shows how to get the filtered rows.
93+
94+
{% tabs %}
95+
{% highlight js tabtitle="app.jsx" %}
96+
{% include code-snippet/spreadsheet/filter-cs2/app/app.jsx %}
97+
{% endhighlight %}
98+
{% highlight ts tabtitle="app.tsx" %}
99+
{% include code-snippet/spreadsheet/filter-cs2/app/app.tsx %}
100+
{% endhighlight %}
101+
{% highlight js tabtitle="datasource.jsx" %}
102+
{% include code-snippet/spreadsheet/filter-cs2/app/datasource.jsx %}
103+
{% endhighlight %}
104+
{% highlight ts tabtitle="datasource.tsx" %}
105+
{% include code-snippet/spreadsheet/filter-cs2/app/datasource.tsx %}
106+
{% endhighlight %}
107+
{% endtabs %}
108+
109+
{% previewsample "page.domainurl/code-snippet/spreadsheet/filter-cs2" %}
110+
88111
## Limitations
89112

90113
The following features have some limitations in Filter:

ej2-react/spreadsheet/how-to/get-filtered-rows.md

Lines changed: 0 additions & 32 deletions
This file was deleted.

ej2-react/spreadsheet/how-to/import-an-excel-document-using-file-uploader.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

ej2-react/spreadsheet/how-to/insert-sheet-programmatically-and-make-it-the-active-sheet.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

ej2-react/spreadsheet/how-to/print.md

Lines changed: 0 additions & 30 deletions
This file was deleted.

ej2-react/spreadsheet/how-to/save-and-open-spreadsheet-data-as-base64-string.md

Lines changed: 0 additions & 28 deletions
This file was deleted.

ej2-react/spreadsheet/how-to/sort-a-range-by-custom-list.md

Lines changed: 0 additions & 38 deletions
This file was deleted.

ej2-react/spreadsheet/notes.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,5 @@ The notes can be added initially when the Spreadsheet loads using cell data bind
9999

100100
* When importing the document with notes, the formatting of the content in the notes will not be available. Similarly, while adding notes, we cannot apply formatting to them.
101101
* The style and appearance of the dialog box for the notes, including size, color, border, and other elements, cannot be directly changed.
102-
* Exporting the workbook along with notes is not supported in file formats such as Comma Separated Values (.csv), Excel Macro-Enabled Workbook (.xlsm), Excel Binary Workbook (.xlsb), and PDF Document (.pdf).
102+
* Exporting the workbook along with notes is not supported in file formats such as Comma Separated Values (.csv), Excel Macro-Enabled Workbook (.xlsm), Excel Binary Workbook (.xlsb), and PDF Document (.pdf).
103+
* Notes added outside the used ranges of the worksheet will not be included in the exported document.

ej2-react/spreadsheet/open-save.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,23 @@ You can open excel file into a read-only mode by using the [`openComplete`](http
9393

9494
{% previewsample "page.domainurl/code-snippet/spreadsheet/open-save-cs4" %}
9595

96+
### Import an excel document using file uploader
97+
98+
If you explore your machine to select and upload an excel document using the file uploader, you will receive the uploaded document as a raw file in the [success](https://ej2.syncfusion.com/react/documentation/api/uploader/#success) event of the file uploader. In this `success` event, you should pass the received raw file as an argument to the Spreadsheet's [open](https://ej2.syncfusion.com/react/documentation//api/spreadsheet/#open) method to see the appropriate output.
99+
100+
The following code example shows how to import an excel document using file uploader in spreadsheet.
101+
102+
{% tabs %}
103+
{% highlight js tabtitle="app.jsx" %}
104+
{% include code-snippet/spreadsheet/open-save-cs9/app/app.jsx %}
105+
{% endhighlight %}
106+
{% highlight ts tabtitle="app.tsx" %}
107+
{% include code-snippet/spreadsheet/open-save-cs9/app/app.tsx %}
108+
{% endhighlight %}
109+
{% endtabs %}
110+
111+
{% previewsample "page.domainurl/code-snippet/spreadsheet/open-save-cs9" %}
112+
96113
### Configure JSON deserialization options
97114

98115
Previously, when opening a workbook JSON object into the Spreadsheet using the [openFromJson](../api/spreadsheet/#openfromjson) method, the entire workbook, including all features specified in the JSON object, was processed and loaded into the Spreadsheet.
@@ -130,6 +147,23 @@ The following code snippet demonstrates how to configure the deserialization opt
130147

131148
{% previewsample "page.domainurl/code-snippet/spreadsheet/open-from-json" %}
132149

150+
### To Open Spreadsheet data as a Base64 string
151+
152+
In the Syncfusion Spreadsheet component, there is no direct option to open data as a `Base64` string. To achieve this, the `import()` function fetches the `Base64` string, converts it to a Blob, creates a File object from the Blob, and then opens it using the [open](../api/spreadsheet/#open) method in the spreadsheet.
153+
154+
The following code example shows how to open the spreadsheet data as base64 string.
155+
156+
{% tabs %}
157+
{% highlight js tabtitle="app.jsx" %}
158+
{% include code-snippet/spreadsheet/base-64-string/app/app.jsx %}
159+
{% endhighlight %}
160+
{% highlight ts tabtitle="app.tsx" %}
161+
{% include code-snippet/spreadsheet/base-64-string/app/app.tsx %}
162+
{% endhighlight %}
163+
{% endtabs %}
164+
165+
{% previewsample "page.domainurl/code-snippet/spreadsheet/base-64-string" %}
166+
133167
### External workbook confirmation dialog
134168

135169
When you open an excel file that contains external workbook references, you will see a confirmation dialog. This dialog allows you to either continue with the file opening or cancel the operation. This confirmation dialog will appear only if you set the `AllowExternalWorkbook` property value to **false** during the open request, as shown below. This prevents the spreadsheet from displaying inconsistent data.
@@ -316,6 +350,25 @@ The following code snippet demonstrates how to configure the serialization optio
316350

317351
{% previewsample "page.domainurl/code-snippet/spreadsheet/save-as-json" %}
318352

353+
### To Save Spreadsheet data as a Base64 string
354+
355+
In the Spreadsheet component, there is currently no direct option to save and open data as a `Base64` string. You can achieve this by saving the Spreadsheet data as blob data and then converting that saved blob data to a `Base64` string using `FileReader`.
356+
357+
> You can get the Spreadsheet data as blob in the [saveComplete](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/#savecomplete) event when you set the `needBlobData` as **true** and `isFullPost` as **false** in the [beforeSave](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/#beforesave) event.
358+
359+
The following code example shows how to save the spreadsheet data as base64 string.
360+
361+
{% tabs %}
362+
{% highlight js tabtitle="app.jsx" %}
363+
{% include code-snippet/spreadsheet/base-64-string/app/app.jsx %}
364+
{% endhighlight %}
365+
{% highlight ts tabtitle="app.tsx" %}
366+
{% include code-snippet/spreadsheet/base-64-string/app/app.tsx %}
367+
{% endhighlight %}
368+
{% endtabs %}
369+
370+
{% previewsample "page.domainurl/code-snippet/spreadsheet/base-64-string" %}
371+
319372
### Supported file formats
320373

321374
The following list of Excel file formats are supported in Spreadsheet:

ej2-react/spreadsheet/sort.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,30 @@ By customizing sort comparer, you can define the sort action as desired.
141141

142142
> * The `sortComparer` is an optional property of `sortDescriptor`.
143143
144-
For custom sort comparer example, refer to the [`Sort a range by custom list`](./how-to/sort-a-range-by-custom-list) in the `how-to` section.
144+
For custom sort comparer example, refer to the [`Sort a range by custom list`] below.
145+
146+
### Sort a range by using custom list
147+
148+
You can also define the sorting of cell values based on your own customized personal list. In this article, custom list is achieved using `custom sort comparer`.
149+
150+
In the following demo, the `Trustworthiness` column is sorted based on the custom lists `Perfect`, `Sufficient`, and `Insufficient`.
151+
152+
{% tabs %}
153+
{% highlight js tabtitle="app.jsx" %}
154+
{% include code-snippet/spreadsheet/custom-sort-cs1/app/app.jsx %}
155+
{% endhighlight %}
156+
{% highlight ts tabtitle="app.tsx" %}
157+
{% include code-snippet/spreadsheet/custom-sort-cs1/app/app.tsx %}
158+
{% endhighlight %}
159+
{% highlight js tabtitle="datasource.jsx" %}
160+
{% include code-snippet/spreadsheet/custom-sort-cs1/app/datasource.jsx %}
161+
{% endhighlight %}
162+
{% highlight ts tabtitle="datasource.tsx" %}
163+
{% include code-snippet/spreadsheet/custom-sort-cs1/app/datasource.tsx %}
164+
{% endhighlight %}
165+
{% endtabs %}
166+
167+
{% previewsample "page.domainurl/code-snippet/spreadsheet/custom-sort-cs1" %}
145168

146169
## Known error validations
147170

0 commit comments

Comments
 (0)