Documentation(EJ2-1014442): Documentation Improvement - User Guide Enhancement#2366
Documentation(EJ2-1014442): Documentation Improvement - User Guide Enhancement#2366NITHISHKUMARRAVIKUMAR wants to merge 10 commits intodevelopmentfrom
Conversation
|
Build Status: INPROGRESS 🔃 |
|
CI Status: FAILURE ❌ |
|
The running CI Job is terminated due to changes committed on the source branch for this Merge Request and CI triggered for latest commit. |
|
Build Status: INPROGRESS 🔃 |
|
CI Status: FAILURE ❌ |
|
Build Status: INPROGRESS 🔃 |
|
The running CI Job is terminated due to changes committed on the source branch for this Merge Request and CI triggered for latest commit. |
|
CI Status: ABORTED ❌ |
|
Build Status: INPROGRESS 🔃 |
|
CI Status: FAILURE ❌ |
Document-Processing/Excel/Spreadsheet/React/rows-and-columns.md
Outdated
Show resolved
Hide resolved
Document-Processing/Excel/Spreadsheet/React/rows-and-columns.md
Outdated
Show resolved
Hide resolved
|
Build Status: INPROGRESS 🔃 |
|
CI Status: FAILURE ❌ |
|
Build Status: INPROGRESS 🔃 |
|
CI Status: FAILURE ❌ |
|
Build Status: INPROGRESS 🔃 |
|
CI Status: FAILURE ❌ |
|
Build Status: INPROGRESS 🔃 |
|
CI Status: SUCCESS ✅ |
|
|
||
| In the Syncfusion React Spreadsheet, you can make the paste action insert only the raw values into the cells, without bringing any formatting or styles from the copied content. This can be done by using the [actionBegin](https://ej2.syncfusion.com/documentation/api/spreadsheet/index-default#actionbegin) event, where the Spreadsheet provides the details of the action being performed. When the action is a clipboard operation, you can set the paste type to Values, ensuring that only plain values are pasted into the sheet. | ||
|
|
||
| The following example shows how `actionBegin` makes the Spreadsheet paste values without formatting. |
There was a problem hiding this comment.
Check and utilize the below content.
The following example shows how to paste values without formatting.
| --- | ||
| layout: post | ||
| title: Paste Without Formatting in React Spreadsheet component | Syncfusion | ||
| description: Paste only raw values without formatting during copy and paste in Syncfusion React Spreadsheet component of Syncfusion Essential JS 2 and more. |
There was a problem hiding this comment.
Modify the description by referring the other How to's description
| <div className="control-section spreadsheet-control"> | ||
| <div style={{ padding: '8px 0' }}> | ||
| <button className="e-btn e-primary" onClick={handleOpenFromJson}> | ||
| Open from JSON |
There was a problem hiding this comment.
We can provide the button text as "Load workbook JSON" like that.
| if (action === "clipboard") { | ||
| eventArgs.type = 'Values'; | ||
| } | ||
| }; |
There was a problem hiding this comment.
We can modify the condition like below right,
if (args.action === "clipboard") {
args.args.eventArgs.type = 'Values';
}
| const options = {}; | ||
| const result = await spreadsheetRef.current.saveAsJson(options); | ||
| const jsonObject = result && (result).jsonObject ? (result).jsonObject : result; | ||
| const content = typeof jsonObject === 'string' ? jsonObject : JSON.stringify(jsonObject, null, 2); |
There was a problem hiding this comment.
Remove the unnecessary codes. Also, there is need to pass the empty options object inside the saveAsJson method.
| You can also customize the generated JSON object by [configuring serialization options](https://help.syncfusion.com/document-processing/excel/spreadsheet/react/open-save#configure-json-serialization-options) and passing them as arguments to the [saveAsJson](https://ej2.syncfusion.com/react/documentation/api/spreadsheet/index-default#saveasjson) method to control how the workbook is exported as JSON. | ||
|
|
||
| Reference: Guide to Creating the JSON Structure: | ||
| https://help.syncfusion.com/document-processing/excel/spreadsheet/react/how-to/create-a-object-structure |
|
|
||
| Overall, this JSON‑based approach offers a faster and more efficient way to save large or complex Excel files, producing lightweight JSON that is easy to store, process, or transmit. | ||
|
|
||
| Please find below the code to retrieve JSON data from the Spreadsheet component. |
There was a problem hiding this comment.
Modify the content as discussed.
UG documentation 1014442: Documentation Improvement - User Guide Enhancement