Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel like copy paste feature for adding data into grid using react and grid library

I am creating a kind of excel online application using react in frontend, Java in backend and Postgres database.I am using a library called ag-grid (community edition).

Now one of the feature i need is to copy and paste data in to rows just as we do in excel.

The grid is going to be linked with the Postgres, all the data in the table in the DB is displayed into the grid and any change made into the grid will be reflected to the DB and vice-versa.

The specific need is, i need copy and paste feature, i need to paste the data which is, say copied from other excel in to my application. I should be able to create blank rows and i should be able to paste the data into those rows, if the blanks rows are less then it rows should get automatically added(as in excel) as soon as data (say multiple rows data) is pasted into a one or more rows.And when i choose to save the my application then data of grid should be saved to DB.

  1. Is it possible to create this feature using ag-grid community ?
  2. Is there any other library which is recommended for this purpose ?

If there is any resource or documentation available for this feature then please point me.

like image 716
AConsumer Avatar asked Jul 10 '26 23:07

AConsumer


1 Answers

Just in case if anyone stumbles upon this problem, I've found a solution from some another website. It uses processDataFromClipboard event of Ag Grid for a custom solution.

https://plnkr.co/edit/lM3OtCQxpJdapHQt?preview

like image 94
Sagar Khatri Avatar answered Jul 13 '26 15:07

Sagar Khatri



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!