Two Problems of Delphi Excel operations using VBA:
1. Use the Excel column name to obtain the corresponding number of columns. For example, column A is 1st columns, column Z is 26th columns, and column AA is 27th columns.
ComplexAlgorithmBecause there are ready-made properties, as follows:
Columnnum: = worksheet. cells [1, 'a']. column;
Columnnum: = worksheet. cells [1, 'z']. column;
Columnnum: = worksheet. cells [1, 'a']. column;
Columnnum: = worksheet. cells [1, 'AB']. column;
2. When you save an existing Excel file after modification, a dialog box is displayed:
---------------------------
The file "resume. xlw" already exists at the current location. Do you want to replace this file?
---------------------------
Set the displayalerts Attribute before saving to block this dialog box. As follows:
Workbook. displayalerts: = false;
Workbook. Save ();
Or
Excelapp. displayalerts: = false;
Excelapp. Save ();
By jrq
2008/01/09 Yu Jing
Note:
The resume. xlw file can be found in the "My Documents" folder of the current user.
2008/01/15