-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copy/paste doesn't work #575
Comments
The copy/paste functionality in that example is for use on the grid itself. If you want to copy the cells to the clipboard, then try using ZeroClipboard (or Clippy if you prefer). You do not have direct access to the clipboard through JS alone. (In the modern browsers.) |
Thanks, I know about ZeroClipboard and browser limitations. I was looking for creative workarounds (like Handsontable does). |
I was able to get this to work in a similar manner to http://www.developerextensions.com/index.php/extjs-excel-copypaste-grid by looking at their code. The idea is that on key-down direct focus to an invisible text area which contains tab delimited cell data which can be copied in and out of excel. |
@provegard I think my plugin may be helpful : http://labs.nereo.com/slick.html |
@tmcconechy I currently use Handsontable, and it does exactly that. @Celebio Unfortunately not. 90% of my users have no idea what Ctrl-V is. They want to right-click and select Paste... So my current workaround is edit-on-select. It gives the user a working Paste menu in any browser, and then I can detect tabular data and expand it into the table. |
Indeed my plugin is aimed to be low level and non-intrusive, thus does not contain any UI element. I prefer to let developers use their prefered UI library for such things. |
I achieved copy to system clipboard in the following simple way:
|
my new master https://github.com/6pac has a fully developed plugin for this based on @Celebio's, with additional bug fixes. see http://6pac.github.io/SlickGrid/examples/example-excel-compatible-spreadsheet.html |
Ah very nice, is there a way to disable pasting back into the grid, e.g read only but with copy functionality still active? |
not at present, but that flag would be very easy to insert |
added plugin option 'readOnlyMode' in the latest push |
how to disable paste for single column, selectable : false worked when i tried to paste for single column. |
should probably have a 'AllowPaste' option for columns - I don't think [cannot select] always means [cannot paste]. Note comment above about the new master repo. Nothing is going to happen here. |
The above about AllowPaste was only a suggestion for a possible fix. It is now implemented as colDef.denyPaste: see #1196 |
Trying out SlickGrid, went for the copy/paste example:
http://mleibman.github.com/SlickGrid/examples/example-spreadsheet.html
Pasting from Excel using Ctrl-V doesn't work. Tested in Firefox, Chrome and IE9.
Copying from SlickGrid into Excel also doesn't work.
The text was updated successfully, but these errors were encountered: