Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi

I want to read XSSFTable all data from excel sheet using NPOi

i am not able to use properties like tbl.GetEndCellReference.getRows()

PLease help.

What I have tried:

using (var fs = new FileStream(@"D:\ConvetDT\NpoiTable.xlsx", FileMode.Open, FileAccess.Read))
           {

               var wb = new XSSFWorkbook(fs);

               for (int i = 0; i < wb.Count; i++)
               {

                  var sheet=(XSSFSheet)wb.GetSheet("Formtable");
                   var table = sheet.GetTables();
                   foreach(var tab in table)
                   {
                      int startCellIndex=tab.GetStartCellReference().getRows()
                       int endCellIndex=tab.GetEndCellReference().getRows();// this is giving error

                   }
                   var row1 =sheet.GetRow(0).Cells[0];

               }
           }
Posted
Comments
joginder-banger 12-Mar-18 7:55am    
what type of error you getting? if is it possible please screen shot for better understanding..
ashu1810 13-Mar-18 2:10am    
Build Error: CallReference dose not contain defination for getRows()
Laxmidhar tatwa technologies 13-Mar-18 5:44am    
Hi may help u bellow link
Stackoverflow/questions/5855813

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900