开发者

Setup Extjs GridPanel to allow pasting from clipboard

I would like to setup Extjs GridPanel to allow pasting from 开发者_如何学编程clipboard. Ideally, I would like to be able to paste a matrix copied from Excel directly onto the GridPanel - does anyone know of an existing method of doing this? or any thoughts on where to start implementing it?


I would start with listening to the onpaste event on the GridPanel. You'll probably have to do some work with getting it to bubble up correctly to your handler.

Hopefully you'll then have a mess of text from Excel to deal with.


There are two extensions for copy/paste actions on Grid Panels :

Excel Editor Grid

and another useful one


You could use a similar method to this other question on HTML tables if you're using IE only. Otherwise, I don't think you can get access to the clipboard in all browsers.

You may want to consider exporting from Excel as a CSV file and importing it into your application.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜