How about:
Range someRange = activeWorksheet.Range["A1", "A1"];
var fontFamily = someRange.Font.Name;
Domanda
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
Nessuna soluzione corretta
Altri suggerimenti
How about:
Range someRange = activeWorksheet.Range["A1", "A1"];
var fontFamily = someRange.Font.Name;