Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Tue Mar 31, 2020 11:29 am

Hi, I have made an generic template, with header/footer and then a table with my "company" design.

But how do I get the reference to my table in spire.doc can I find it by Document.Section[0].Tables[0], how can this be done in Spire.Xls

ThomasBojer
 
Posts: 3
Joined: Mon Mar 02, 2020 8:47 am

Wed Apr 01, 2020 2:11 am

Hello,

Thanks for your inquiry.
Please refer to the following code to get the table in Excel document. If there is any question, please provide your input file for reference.
Code: Select all
    Workbook wb = new Workbook();
    wb.LoadFromFile("fileName");
    Worksheet sheet = wb.Worksheets[0];
    //Get the first table
    IListObject table1 =  sheet.ListObjects[0];
    //Your code...


Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Thu Apr 09, 2020 10:20 am

Hello,

Greetings from E-iceblue!
Did my code help you? Could you please give us some feedback at your convenience?
Thanks in advance.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Return to Spire.XLS