Quantcast
Channel: NPOI
Viewing all articles
Browse latest Browse all 1621

New Post: Table name evaluation

$
0
0
Hi,

I found the solution myself :
Here the code I used :
            FileStream fs = new FileStream("c:\MyExcelFile.xls"", FileMode.Open);
            XSSFWorkbook workbook = new XSSFWorkbook(fs);
            ISheet iWorksheet = workbook.GetSheet("MyWorkSheetName");
            XSSFSheet worksheet = (XSSFSheet)iWorksheet;
            List<XSSFTable> tables = worksheet.GetTables();
            XSSFTable table = tables.Single<XSSFTable>(x => string.Compare(x.Name, "MyTableName", true) == 0);
I hope this will be usefull for someone...

Sybaris

Viewing all articles
Browse latest Browse all 1621

Trending Articles