DELPHI DBGRID EXPORT TO PDF

Hello All, Could somebody can show me a short example how to export a dbgrid to a simple text file (comma separated)? I did not find any. There is already an article explaining how to export from THTMLViewer using eDocEngine. However, it tried to solve a bit more complicated. Exporting a DBGrid to excel without OLE I develop software and about 95% of my work deals with databases. I enjoied the advantages of using Microsoft Excel.

Author: Samurn Gardacage
Country: Nigeria
Language: English (Spanish)
Genre: Life
Published (Last): 14 October 2005
Pages: 304
PDF File Size: 5.89 Mb
ePub File Size: 14.34 Mb
ISBN: 973-4-72586-732-7
Downloads: 74291
Price: Free* [*Free Regsitration Required]
Uploader: Kezragore

FieldCount – 1 do begin s: By clicking “Post Your Answer”, you acknowledge that you have read our dhgrid terms of serviceprivacy policy and cookie policyand that your continued use of the website is subject to these policies. So I made it last so that Lista doesn’t leak if it does raise an error. I’m afraid I don’t undestand this point.

If you want a fast export of raw data, just export your recordset ADODataset. Dbgfid grid is a kind of “preview” and the user can choose the order in wich the fileds will be exported, by changing the field’s order in the grid.

  ISF SOGP 2011 PDF

It is working by using Tfilestream component procedure TForm2. FieldName ; end; s: That’s why I use a dbGrid I too was going to give the reference that Bummi gave. And bummi’s right; if at all possible export the underlying dataset. And if We want export an ClientDataset to Excel then what we do? Paul Scot Delphi Developer. I suggest you wxport using these, then exporr you have specific questions about code parts not working, post them here.

I did this procedure and so far it works fine. Agustin Seifert 1, 12 TObject ; var Stream: In order to use the variant array approach, you have to know how many rows you have in the query. If delpni dont have a recordset, you have to iterate your dataset and write excel accesing cells.

Sun, 29 Aug Okay I will go have a look at that.

delphi – Exporting data from a DBGrid to Excel – Stack Overflow

Tue, 24 Aug Alexander 3, 6 13 I would write a generic procedure taking the dbgrid as a parameter and then follow the properties to retrieve header and data. Sergio Gonzale Delphi Developer. Otherwise it may be simpler to use the csv approach which I gave in dwlphi question.

  74LS76 DATASHEET PDF

Or directly write to file with AssignFile etc.

: export a TDBGrid to excel without OLE?

EnableControls can raise an exception since it causes the screen to update, indirectly. The ‘try’ is in the wrong place, though. Do not export the DBGrid, export the dataset stackoverflow. CSV File Access I will save it for future use.

Reproduced Delphi DBGrid derived Excel method

I’m just curious if that’s the best way to do it FieldCount – 1 do begin sTemp: Post Your Answer Discard By clicking “Post Your Answer”, you acknowledge that you have read our updated terms of serviceprivacy policy and cookie policyand that your continued use of the website is subject to these policies.

Sign up or log in Sign up using Google. I have the feeling that I’m reinventing the wheel