AndersonSOS Posted July 6, 2017 Share Posted July 6, 2017 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 Link to comment Share on other sites More sharing options...
rencarnacion Posted July 6, 2017 Share Posted July 6, 2017 You can use the TMS component Flexcel it an excellent component for import and export from excel Link to comment Share on other sites More sharing options...
delagoutte Posted July 6, 2017 Share Posted July 6, 2017 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 Link to comment Share on other sites More sharing options...
AndersonSOS Posted July 7, 2017 Author Share Posted July 7, 2017 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 Link to comment Share on other sites More sharing options...
alesf76 Posted April 5, 2019 Share Posted April 5, 2019 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 ? Link to comment Share on other sites More sharing options...
billyChou Posted April 7, 2019 Share Posted April 7, 2019 I use TMS FlexCel for VCL & FMX import to memory table (unidac ). https://www.tmssoftware.com/site/flexcel.asp Link to comment Share on other sites More sharing options...
Tokay Posted April 9, 2019 Share Posted April 9, 2019 I use this components for xlsx access: http://avemey.com/zexmlss/index.php?lang=en It free and works fine. Link to comment Share on other sites More sharing options...
araujoadanr Posted April 29, 2021 Share Posted April 29, 2021 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. Link to comment Share on other sites More sharing options...
Sherzod Posted April 29, 2021 Share Posted April 29, 2021 4 hours ago, adan200 said: I have tried all commercially available components https://www.axolot.com/xls.htm ? Link to comment Share on other sites More sharing options...
Recommended Posts