Build 4.5.0.75 of xlsgen allows to edit ranges of existing tables. This applies to XLSX (and their variants) and XLSB files.
To obtain the cell range,
C++ code |
_bstr_t range = worksheet->Tables->ItemByName[L"Table1"]->DataSource->Range; // returns a cell range of the form RxCx:RyCy
|
To change it,
C++ code |
worksheet->Tables->ItemByName[L"Table1"]->DataSource->Range = L"R1C1:R15C10";
|
Alternatively, if the scenario knows in advance that all it needs is to add a new row to the table,
C++ code |
worksheet->Tables->ItemByName[L"Table1"]->DataSource->AddRow();
|