Search code examples
c#.netexcellinq-to-excel

How can I get cell formatting when querying via LinqToExcel


I am using LinqPad in conjunction with Linq2Excel to do my own data analysis on an Excel spreadsheet (written and owned by others). These other people use a lot of cell formatting to represent data. For example, a grey background cell means "not applicable"; text format == strikethrough means "superceded".

Is there any way to get at these format values in LinqToExcel so I can filter on them?


Solution

  • Unfortunately it's not possible to retrieve the cell format values through LinqToExel.

    LinqToExcel uses OleDb to retrieve data from the spreadsheets, and OleDb doesn't include information about the cell formatting.