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

Free Support Forum - aspose.com

How to compare two or more data table?

I have 3 data table.

Data table 1 contains


1 A B

Data table 2 contains


1 A B

2 B C

Data table 3 Contains


1 A B

2 B C

3 C D

Data Table 1 and 2 are from database

Data table 3 is the uploaded excel data.

First Data table 3 should be compared with data table 1.

ID 1 A B are matched in both.

Second Data table 3 should be compared with data table 2

In this ID 1 and 2 are same

Finally it should show message as row 1 and 2 are already exists.

It should not show message as row 1 already exists
row 1 already exists
row 2 already exists

Please say me how to do coding for this

	<div class="clear"></div>		
	<div class="pagination-thread">‹ Previous Thread<span class="separator">|</span><a rel="nofollow" href="http://forums.asp.net/t/next/2087884">Next Thread ›</a></div>

    <form id="__AjaxAntiForgeryForm" action="#" method="post"></form>

		<a href="http://engine.adzerk.net/r?e=eyJhdiI6MTA4MDEsImF0Ijo0LCJidCI6MCwiY20iOjM0NDk3MCwiY2giOjQ4MTEsImNrIjp7fSwiY3IiOjkxNDgzOCwiZGkiOiJmYTVmZjhhZGRmMzA0NzYyOWYxY2QyMDMwZGNmMWFjZCIsImRtIjoxLCJmYyI6MTQ5Nzk1MiwiZmwiOjEwODkyMTAsImlwIjoiMTE3LjE5Ny4xODguMTMxIiwibnciOjIwNzIsInBjIjowLCJlYyI6MCwicHIiOjY2MDU4LCJydCI6MSwicmYiOiJodHRwOi8vZm9ydW1zLmFzcC5uZXQvMTE0Ni5hc3B4LzE_TVZDIiwic3QiOjE4MDk5LCJ1ayI6InVlMS0xNDlmYWYxNWI0MTE0MTUzOTk3ZTFmOWEzMDk4MDNhMyIsInRzIjoxNDU3OTczNzQ4OTEzLCJiZiI6dHJ1ZSwicG4iOiJCb3R0b21BZCIsInVyIjoiaHR0cDovL3d3dy5oYW5zZWxtYW4uY29tL2Jsb2cvQ2F0ZWdvcnlWaWV3LmFzcHg_Y2F0ZWdvcnk9TnVHZXRQT1cifQ&s=BJh7fT-3M2miOp2-AVODNeXabVQ" rel="nofollow" target="_blank" title="Microsoft Ad"><img src="http://static.adzerk.net/Advertisers/5efcac101caf4f3f9e75d6f86e623220.png" title="Microsoft Ad" alt="Microsoft Ad" height="90" border="0" width="728"></a>


Thanks for providing us some details.

Well, Aspose.Cells is a spreadsheet management library used to create, manage, render or convert MS Excel file formats (e.g XLS, XLSX, XLSB, XLSM, CSV, Tab Delimited, ODS, SpreadsheetML (.xml) etc.). I am afraid, Aspose.Cells component does not provide any means to establish a connection with any type of database or any other data source on the first place nor it provides an ability to compare the spreadsheet against data in the datatable/database. Aspose.Cells for .NET APIs does provide ability to import data from different data source (including DataTable) and export spreadsheet contents to data containers, such as DataTable. I am afraid, you have to use your own custom logic to implement your scenario and compare the DataTables. You may either import your data tables to fill the worksheet(s) and compare the data cell by cell via Aspose.Cells APIs or export data from Excel worksheet to fill a datatable/array (via Aspose.Cells) and then use your own .NET code to compare two datatables.

Thank you.