Jump to content


Photo

Import spreadsheet information from excel

import excel

  • Please log in to reply
3 replies to this topic

#1 AndersonSOS

AndersonSOS

    Member

  • uniGUI Subscriber
  • PipPip
  • 20 posts

Posted 06 July 2017 - 03:37 PM

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

  • 0

#2 Ronny Encarnacion

Ronny Encarnacion

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 507 posts

Posted 06 July 2017 - 03:49 PM

You can use the TMS component Flexcel it an excellent component for import and export from excel 
 


  • 0

Ronny Encarnacion


#3 delagoutte

delagoutte

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 297 posts

Posted 06 July 2017 - 03:56 PM

You could use scalabium import suite : http://www.scalabium.com/smi/

 

it Work fine and without excel so you won't have all problem that can exist with OLE


  • 0

#4 AndersonSOS

AndersonSOS

    Member

  • uniGUI Subscriber
  • PipPip
  • 20 posts

Posted 07 July 2017 - 12:22 PM

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

  • 0





Also tagged with one or more of these keywords: import, excel

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users