Welcome, Guest
Username: Password: Remember me
Components and Libraries for Database Development, discussions, problems and suggestions
  • Page:
  • 1

TOPIC:

Excel as a table? 10 years 6 months ago #4744

  • Maximiliano
  • Maximiliano's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 47
  • Thank you received: 3
It is a question repeated, lost data from a database in mysql. (The backup did not work) and the only way to restore it is with some excel files that I can download.
But in Delphi, there is a comoponente ADOconection / ADOTable that allows me to see the file and treat it as a table. The best I found was FPSpreadsheet read the file and pass it to the other side, which wanted to avoid.
Any suggestions?

Please Log in or Create an account to join the conversation.

Excel as a table? 10 years 6 months ago #4745

  • Hamid MIRA
  • Hamid MIRA's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 5
  • Thank you received: 0
If you are using SQL Server, you can do some thing like this. This allows you to import data into SQL Server table.
SELECT * INTO MyTable FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\temp\MyTable.xls', [Sheet1$] )
Then, under Delphi, do SELECT .... FROM MyTable ....SQL Server table (using component ADO)
then INSERT INTO .... MySQL table (using component for MySQL)
PS : I don't speak English very well !
A+

Please Log in or Create an account to join the conversation.

Excel as a table? 10 years 6 months ago #4746

  • 4aiman
  • 4aiman's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Comix creator
  • Posts: 227
  • Thank you received: 12
I'm not sure if this will help you (especially after more convenient mysql import example), but I've found this: freepascal.ru/forum/download/file.php?id=187 (allbeit that is from "OdsReport - direct output to OpenOffice.org Calc" thread, e.g. it's rather an import example than an export one...)
Also there is the "uno-pas bridge" project (and we all(?) know that UNO is cross-platform and COM is not) which can be found here: uno-pas-bridge.sourceforge.net/pre-release.php
コンソールマニアック

Please Log in or Create an account to join the conversation.

  • Page:
  • 1