Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# read excel file columns using epplus

 FileInfo excelFile = new FileInfo(excelFilePath); ;
                ExcelPackage.LicenseContext = LicenseContext.NonCommercial;
                using (ExcelPackage package = new ExcelPackage(new FileInfo(excelFile.ToString())))
                {
                    foreach (ExcelWorksheet worksheet in package.Workbook.Worksheets)
                    {
                        List<string> ColumnNames = new List<string>();
                        for (int i = 1; i <= worksheet.Dimension.End.Column; i++)
                        {
                            ColumnNames.Add(worksheet.Cells[1, i].Value.ToString());                }
                    }
                }
 
PREVIOUS NEXT
Tagged: #read #excel #file #columns #epplus
ADD COMMENT
Topic
Name
1+9 =