Jump to content
uniGUI Discussion Forums
AndersonSOS

Import spreadsheet information from excel

Recommended Posts

Hello,

I have a question within my application that needs at some point I need to import information from an excel spreadsheet into the application.

In desktop applications I use options that use COMobj and use the following code:

 

Procedure ...

  Var excelSheet, Excel: Variant;

Begin

   Excel: = CreateOleObject ('Excel.Application');

   Excel.Visible: = false;

   Excel.WorkBooks.Open (FileSource.Text);

   ExcelSheet: = excel.Workbooks [1] .WorkSheets [1];

   DData: = Excel.WorkBooks [1] .Sheets [1] .Cells [1,1];

End;

 

When I use this function in uniGui it's message:

 

CoInitialize was not called, ProgID: "Excel.Application".

 

Could anyone help with this?

 

Best regards

 

Anderson

Brazil

Share this post


Link to post
Share on other sites
Hello friends, good morning,

Thank you for your help.

The SMImport Component worked perfectly.

Had already used it to export, and had forgotten that it also has the component for import.

Big hug.

 

Anderson

 

Brazil

Share this post


Link to post
Share on other sites

×