I currently have an excel that has a defined Table "Employees" that contains 50 employees. I can get that data easily and process it but after that I want to update the table with additional employees. I can write the data to the correct rows and cells using Document.Excel library but I cannot figure out how to tell the Table to now include the added rows so that when the Excel file is opened again formulas know to include the added rows.
Is there a way to redefine the Named Table using the Document.Excel library?
Is there a way to delete the Named Table then re-add it with the correct defined range without destroying existing references to other formulas?
Hello,
Is it possible to post a small sample with dummy data, which demonstrate your issue in order to be able to investigate this further for you. Also please point which exactly cell of the excel file should update its formula.
I am waiting for your details.
Please see the attached ZIP. It contains three files.
1. Timesheet_Initial.xlsm - Start with this file. It shows a table with 9 employees listed.
2. Timesheet_AfterProcessing.xlsm - This file show additional employees that were added using the Infragistics.Document.Excel library (version 12.1).
3. Timesheet_DesiredResult.xlsm - This is what I am looking for. This file shows the table including the additional rows.
Specifically we are looking for the Named Range that defines the Employees table to be changed from:
=LOOKUPS!$A$3:$E$11
to
=LOOKUPS!$A$3:$E$17
Note, even though these are xlsm files you DO NOT NEED to enable macros to see or interact with the the data. Our final files will have macro code in them so I kept that file format for this sample.
Thanks,
Eric