Improve copy paste of JExcel with Scalling, paste style from Excel, copy paste onlystyle.
npm install @jspreadsheet/copypaste_advancedThe Copypaste_advanced plugin improves the copy paste functionality of jSpreadsheet. It works even if access to the clipboard is denied or in error.
This plugin is Free
- Add items cut, copy, paste on default toolbar
- Add item paste on default context menu when it is not present
- Upgrade copy/paste of jSpreadsheet when clipboard access is denied
- Override copy methods of jSpreadsheet
- Can copy scale like Excel
- Work on Mobile
- Paste data from Excel (with or without style)
- Add items on topmenu bar (plugin) where you want with position property
- NEW : Multiple select cells with Ctrl pressed, copy this multiple cells and paste
jSpreadsheet, a lightweight Vanilla JavaScript plugin, can help you create exceptional web-based interactive tables and spreadsheets. Compatible with most widely-used spreadsheet software, such as Excel or Google Spreadsheet, it offers users an unrivalled Excel-like user experience. It also works well with prominent modern frameworks and flexibly utilizes a large collection of events, extensions and configurations to meet different application requirements. Impress your clients with a better user experience and a great dynamic interactive data management tool.
- jSpreadsheet Pro v8
or
- jSpreadsheet Pro v9
- or
- jSpreadsheet Pro v10
| Option name | Description | Type | Default Value |
|---|---|---|---|
allow_pastestyle | Allow paste style on copy/paste | Boolean | true |
position_toolbar | Define position in toolbar (null: default behavior, found first divisor and add after, false: not add, int: add specific position | int/null/false | null |
| Option name | Default Value |
|---|---|
text_paste_special | Paste special |
text_paste_only_style | Paste only format |
text_paste_only_value | Paste only value |
| Method | Description | Example |
|---|---|---|
copy(Optional Boolean cut) → Array | Copy selected cells. If copy(true), you cut selected cell. This methods return same result of jspreadsheet.current.copy(). | jspreadsheet.current.plugins.copypaste_adv.copy(); |
paste(Optional Boolean OnlyValue) → Void | paste data copied on selected cell | jspreadsheet.current.plugins.copypaste_adv.paste(); |
Header on page
``HTML
`
Initialize plugin on jSpreadsheet
`JavaScript`
jspreadsheet(document.getElementById('spreadsheet'), {
...
plugins: [
...
{ name:'copypaste_adv', plugin:jss_copypaste_advanced},
...
],
...
});
#### Example of code for custom toolbar
`JavaScript`
jspreadsheet(document.getElementById('spreadsheet'), {
...
toolbar: [
...
{
content: 'content_cut',
onclick: function() {
if (jspreadsheet.current.selectedCell) {
jspreadsheet.current.copy(true);
}
}
},
{
content: 'content_copy',
onclick: function() {
if (jspreadsheet.current.selectedCell) {
jspreadsheet.current.copy();
}
}
},
{
content: 'content_paste',
onclick: function() {
if (jspreadsheet.current.selectedCell) {
jspreadsheet.current.parent.plugins.copypaste_adv.paste();
}
}
},
...
],
...
});
You can use this CDN link
`HTML`
javascript
import jss_copypaste_advanced from '@jspreadsheet/copypaste_advanced';
``Copyright GBonnaire.fr and Code released under the MIT License