Jump to content

Recommended Posts

Posted
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

Posted
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

  • 1 year later...
Posted

I also tried to use the smimport component, but I always get an exception when executing the execute method.

Did you used any special option ?

  • 2 years later...
Posted

Hello everyone, I have tried all commercially available components, for example SMImport, EMS Advanced Data Import Component, TMS Flexcel, and various other solutions. (including importing directly from SQL Server with Access Database Engine).
They all work similarly and well, except when you have sheets of thousands and thousands of records. (50,000 and more records)
I developed a series of applications for the health authority of my country, where some files have that many records, and I did a lot of tests until I was successful.
In the latter case, the only one that passed the test is TMS Flexcel.

 

×
×
  • Create New...