I really need a component to import from Excel file for Delphi 7 or the like. It is necessary to save the data from the file in the Oracle Database.
1 answer
As far as I know, there is no such component.
Take the Excel file translate it into CSV download to the program in the form of a simple list with a separator ";" Parse and write to the database.
uses ..., ComObj; procedure XlsToCsv (n1:string; n2:string); // Преобразование форматов var ExcelApp, WorkBook: variant; begin ExcelApp:=CreateOleObject('Excel.Application'); ExcelApp.DisplayAlerts:=False; WorkBook:=ExcelApp.Workbooks.Open(n1); ExcelApp.Visible:=false; WorkBook.SaveAs(n2, 6); // xlCSV = 6, xlCSVMac = 22, xlCSVMSDOS = 24, WorkBook.Close; //или юзер ничего не увидел ExcelApp.quit; end;
- Thank you very much. I will try ... - ded_moroz63
|