Search code examples
openxmlxlsopenxml-sdkxlsxnpoi

How to read excel cell format (both .XLS & .XLSX)


I need to read the formatting information available in a cell in excel. The excel file might contain an cell with text like "Some sample text". Each word would have a different formatting information. Like word "Some" might be bold and have a different font color and size. The next word might have different one.

Can we read the individual formatting information set for a single cell value? if yes, please let me know how to do the same.

I had used NPOI and OpenXML SDK 2.5 and with no luck. Prefer not to use excel interop, since this would be processed in the server.


Solution

  • You are talking about reading RichText value from Cell. It will be supported by NPOI 2.0 final release. The release will happen in the first quarter, 2014.