Page 1 of 1
Export query results to flat file or CSV?
Posted: Mon 11 Apr 2005 16:16
by sean
Hi,
I was wondering if there is a (generic) easy way of exporting all column + rows in a MyQuery to a CSV (or even excel..) file?
Thanks in advance,
Sean
Posted: Tue 12 Apr 2005 12:49
by Ikar
There is no such possibility directly. But you can use TMyBackup in text mode or that is more correct use any third-party report builder. We cannot suggest you any certain reporter, please try to search for it in any component storage for Delphi.
Posted: Thu 14 Apr 2005 15:30
by guest
hi sean, you can use EMS QuickExport / Quickimport components...
or this one (more powerfull) , it is free for non commercial apps :
http://www.scip.be/index.php?Page=Compo ... anguage=EN
Posted: Fri 29 Apr 2005 13:45
by sean
On a similar vein, is there a way of accessing TCRDBGrid cell values, as opposed to the underlying dataset? I've spent hours looking through the various properaties and see many options for setting column specific things like filed names, titles etc, but not for iterating through each row and column.
If rows are selected, "SelectedRows" would seem to allow access to all values, but what about all rows?
i.e. I'd like to use something like
CRDBGrid.Row.Column[j].AsString
Thanks in advance..
Posted: Fri 29 Apr 2005 14:36
by Ikar
CRGrid doesn't provide such possibility and we are not planning to add export feature now.
Posted: Fri 29 Apr 2005 20:40
by sean
OK, thanks for the quick reply.
Posted: Fri 29 Apr 2005 20:51
by Guest
As regards EMS QuickExport noted above, it does look quite interesting, and even the commercial version is not expensive. But I can also do this (granted with more effort) with Excel Server components.
I use Grid method GetCellParams to change the values & colours of some celles as displayed in the grid, and also set title etc. of course I could do this all over again using Excel and the Dataset, but I'm coming across the situation often now where I make a Grid and would like to export exactly to Excel.
Posted: Tue 10 Jan 2006 23:31
by sean
Hi,
I'm back to this problem, for another project, almost a year later: how to dump the contents currentl shown in a Gid, so that I can for example export it to excel.
I've never worked with 'copy and paste', and was there a way to perhaps highlight several rows, right click and do "copy" or something?
==> Could you have any same code on how to access the rows and columns of several rows that have been highlighted?
Thanks.