I’m trying to export the data from MS Excel sheet to a datatable using C# in VS 2010 WinForms application.
I want some rows to be eliminated from being exported in Excel based on the text forecolor, like the text color is in Black, Green and Red in color. If the text color is Green in color, then I want to exclude that row from being exported.
How can I achieve this?
You should iterate through rows in Excel and check the text color before exporting. Open Excel file first.
It is good to get the area that is in use first:
Iterate: