I am writing a c# program to read excel file using OpenXML. I have a list of words added in a column in the excel file in a column.I want to read them and add to an array list. I am using the below code
using (SpreadsheetDocument doc = SpreadsheetDocument.Open(filePatah + "\\" + fileName, false))
{
WorkbookPart workbookPart = doc.WorkbookPart;
WorksheetPart worksheetPart = workbookPart.WorksheetParts.First();
SheetData sheetData = worksheetPart.Worksheet.Elements<SheetData>().First();
ArrayList data = new ArrayList();
foreach (Row r in sheetData.Elements<Row>())
{
foreach (Cell c in r.Elements<Cell>())
{
data.Add(c.CellValue.Text);
}
}
}
What I am seing is 1,2,3,4 etc with this while I am expecting the words to list. What should I need to do to get the words ?