문제

I want to import data from excel sheet with richtext i.e. font family

But I can get only bold and italic style using below given code

Microsoft.Office.Interop.Excel.Range Range = (Microsoft.Office.Interop.Excel.Range)Cell;
    int TextLength = Range.Text.ToString().Length;
    for (int CharCount = 1; CharCount <= TextLength; CharCount++)
    {
        Microsoft.Office.Interop.Excel.Characters charToTest = Range.get_Characters(CharCount, 1);
        bool IsBold = (bool)charToTest.Font.Bold;
        bool IsItalic = (bool)charToTest.Font.Italic;
        // other formatting tests here
    }

Can anybody help me to get the rich text data from Excel Sheet using Interop or any other method in c#.net

Thanks in advance

올바른 솔루션이 없습니다

다른 팁

How about:

Range someRange = activeWorksheet.Range["A1", "A1"];
var fontFamily = someRange.Font.Name;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top