3

We have some info that is contained within an excel sheet. the excel sheet contains two columns; customer name + customer balance. Now I need to display this info inside my asp.net mvc view, basically to query the excel sheet based on the customer name and display its total balance inside my view.

In this way we will be uploading the excel sheet inside our system each month or each day , and we will be querying the excel sheet instead of the DB. So is this possible using EF ? or it is better to exact the data from the excel sheet and add it to Datable inside the database? Thanks

1

4 Answers 4

6

You can use LinqToExcel, this provides normal linq structure to query excel sheets.

Note: As of January 2022, this project is no longer maintained, as noted in the repo's readme.

Sign up to request clarification or add additional context in comments.

Comments

0

It is better to extract the data from the excel sheet and add it to Datable which you can do using oledbconnection object , connectionobject.GetOleDbSchemaTable.

Comments

0

FileContextCore seems like an effort to make excel and other file types work in EF Core. Obviously this can be nice for consistency if you're already using EF Core.

1 Comment

currently doesn't work for .net 5 and up
-1

Excel is not a database system so don't think directly you can use the entity framework. But yes Excel can be read using .net APIs

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.