Henry Olive 5 Posted July 9, 2021 I wish everyone a healthy day. Excel (Row1 =Date, Row2=Quantity) A............................B.........................C....................... 1...05-01-2021......05-02-2021.....05-03-2021 2...150..................... 200......................250 I need to import above datas into my table as below Date.........................Qty 05-01-2021..........150 05-02-2021..........200 05-03-2021..........250 ........ ........ Could someone please show me how to do ? Thank You Share this post Link to post
FPiette 383 Posted July 9, 2021 Export the Excel sheet as a CSV file which is a text file that you can easily parse with Delphi. Or automate Excel from your Delphi application to get the cells. Probably other solutions exists. 1 Share this post Link to post
aehimself 396 Posted July 10, 2021 If you have Excel installed where the program will run you can use the COM API to interact with Excel files from your Delphi app I think. I personally never used any of these but I know it can send E-mails with Outlook so I suppose you can use Excel too. From there it's easy as a pie. Just do a loop, dataset.Append; dataset.FieldByName.AsString := excelcell; dataset.Post. @FPiette has my preferred answer too. Just export to CSV / TSV (which I personally prefer) and it's really easy to parse those with Delphi. Share this post Link to post