How would you check an Excel columns in order to compare with a data in the database table?

Cenk 991 Reputation points
2023-01-11T11:36:35.8433333+00:00

Hello folks,

I am working on a Blazor Server application. I would like to upload an excel file, consisting of a couple of columns. (ReferenceId-guid, Order Date-datetime, Product Code-string, and Product Description-string) This excel file roughly has 200000 rows of data.

I am gonna use EPPlus non-commercial package. I will compare the referenceId's from the excel with the database but there might be duplicate referenceId's. So I am somehow grouping those referenceId's in excel and then iterating it comparing them with the database records.

One last requirement is to write down both matching and nonmatching referenceId's in an excel file. I think when comparing the referenceId's adding those values into two separate lists (matching, non-matching) and then writing those records inside of those lists in excel with EPPlus will solve my problem.

Can I have your comments about this solution? Can it be improved?

Thank you.

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,397 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,499 questions
Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,687 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,640 questions
{count} votes