Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var
- ExcelApp: OleVariant;
- anExcelFileName: String;
- begin
- try
- ExcelApp := CreateOleObject('Excel.Application');
- anExcelFileName := 'D:sample.xlsx';
- ExcelApp.Workbooks.Open(anExcelFileName);
- ExcelApp.Visible := True;
- ExcelApp.Workbooks[1].Sheets[1].Range['A1'].Value := 'HELLO';
- except
- on E: Exception do
- showMessage('Error on something: ' + E.Message);
- end;
- end;
Add Comment
Please, Sign In to add comment