We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to compare the excel data with data in table(Database)?

I have one scenario.

1) Uploading of excel. Excel having 10 row with 10 column

I have attached one excel for your reference.

If i upload it will get inserted into table named ABC in backend with one ID(Say 1) generated for that 10 rows.

2) If i upload the same excel again, it is getting inserted in backend by generating the ID no. 2.

When i upload the excel, I want to compare the data in excel with the data in database based on ID. If the database having the same data as that of second upload file it should show message as “Already exist”. How can we achieve this through aspose.cells. It should giv message if the all
the row and all the data in the cell matches.


Hi Harish,

Thank you for contacting Aspose support.

I am afraid, Aspose.Cells APIs do not provide any means to establish a connection with any type of database nor provides an ability to compare the spreadsheet against data in the database. However, Aspose.Cells for .NET APIs provide ability to export spreadsheet contents to data containers such as DataTable. You may use this feature in your own custom logic to compare the DataTables, if this suits your requirements.