How to get a cell value from an excel file with LINQ

Hi all, I was wondering, how can I use LINQ, to get the values from an excel file and display it in a message box, also how to get a single cell value from a specific column name and display it using write line with LINQ?

Thank you in advance.


please refer to the following post


Hi @Sidney_Vogel ,

You can use a combination of a Where and FindIndex or IndexOf to achieve whatever it is you want to achieve, but we can only provide the actual LINQ for you once you provide an example of the output that you want.

Does this cell value have to meet any condition, other than being present in a given column?
Do you only want to retrieve that particular cell value, or the position it is present in?
Or do you want the entire column values as a list/array of values?

Lots of questions can be asked, which translates into different ways to develop LINQ.
Please provide some more detail so that we can help you out.

Kind Regards,
Ashwin A.K