Hey ievgen Miroshnikov,
public void run (boolean _onlyTest)
{
SysExcelApplication application;
SysExcelWorkbooks workbooks;
SysExcelWorkbook workbook;
SysExcelWorksheets worksheets;
SysExcelWorksheet worksheet;
SysExcelCells cells;
COMVariantType type;
int row;
;
application = SysExcelApplication::construct();
workbooks = application.workbooks();
try
{
workbooks.open(filename);
}
catch (Exception::Error)
{
throw error ("File cannot be opened");
}
workbook = workbooks.item(1);
worksheets = workbook.worksheets();
worksheet = worksheets.itemFromNum(1);
cells = worksheet.cells();
// Excel lesen und alle Zeilen verarbeiten
do
{
row++;
this.readRow(row, cells);
this.insert();
type = cells.item(row+1, 1).value().variantType();
}
while (type != COMVariantType::VT_EMPTY);
//salesTableImpor_ds.executeQuery();
//Excel Anwendung schließen
application.displayAlerts(false);
application.quit();
}
This is my run method and after the insert i want the refresh.
After compile with the code from Javier Biesa the the error message was:
The field is not present in the table.
thats all
Thanks for your answer.