![](https://en.delphipraxis.net/uploads/set_resources_2/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
![](https://en.delphipraxis.net/uploads/monthly_2022_11/V_member_10625.png)
Valter
-
Content Count
2 -
Joined
-
Last visited
Posts posted by Valter
-
-
Hello everybody.
I wrote a management software with Delphi 10 Seattle and recently I was asked to automate the updating of an Excel file after issuing an invoice.
I access the file, find the first blank line and fill in the fields.
Since this is the only operation required, I don't use any add-ons.
This is part of the cleaned up code:
ExcelApplication := CreateOleObject('Excel.Application'); ExcelWorkbook := ExcelApplication.Workbooks.Open(ExcelFileName); ExcelWorksheet := ExcelWorkbook.WorkSheets[1]; ExcelWorksheet.Select; ExcelWorksheet.Cells[i,2] := cod; ExcelWorksheet.Cells[i+1,2].Select; // Undeclared identifier 'Select' ExcelWorkbook.Save;
The customer requests that the cell following the one inserted is selected when opening the Excel file.
Despite the undeclared identifier error, the code compiles and the application works correctly.
I specify that in typing this code I have no self-completion by the IDE.
Is it possible that some units are missing? I searched the net but couldn't find any suggestions.
Â
Undeclared identifier but the code compiles
in Delphi IDE and APIs
Posted
Yes, they are Variants.
Ok, thank you for the clarification.
It is boring to have this error message but I can live with it 🙂
Thanks again.
Â