Site icon Embarcadero RAD Studio, Delphi, & C++Builder Blogs

Use the Excel.Application in C++Builder(bcc64)[JAPAN]

Author: Pixelot12345

How to use the Excel.Application in C++Builder. Target device is Win64.

Use the ComObj, call in CreateOleObject (“Excel.Application”).

Including ComObj is required.

In C++Builder it is below.

[crayon-6ad162705d518907179573/]

Import from CSV file to Excel file.

[crayon-6ad162705d524535681728/]

We will implement this process.

Prepare the TButton.

TButton is one in a simple form.

 

Next is the TButton OnClick event.

[crayon-6ad162705d527152378804/]

 

Sheet name is “Sheet 1”.

Next we will create two methods.

[crayon-6ad162705d52a175788585/]

Read the file with TStringList.And, you write to the specified cell.

 

[crayon-6ad162705d52d269660271/]

Write the imported CSV file to Excel.

 

 

 

Exit mobile version