DELPHI DBGRID EXPORT TO PDF

| | 0 Comments

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: Kazrajar Zuluzragore
Country: United Arab Emirates
Language: English (Spanish)
Genre: Medical
Published (Last): 28 July 2004
Pages: 214
PDF File Size: 15.99 Mb
ePub File Size: 16.2 Mb
ISBN: 128-3-62661-976-5
Downloads: 52350
Price: Free* [*Free Regsitration Required]
Uploader: Dusar

As the DBGrid might have a different set of fields then the original resultset you need to access these. FieldCount – 1 do begin sTemp: Alexander 3, 6 13 Mon, 23 Aug No’amNewman depending on the datataypes the csv approach might give more trouble in convertions e. TObject ; var Stream: Sun, 29 Aug That’s why I use a dbGrid I’m afraid I don’t undestand this point.

In order to use the variant array approach, you have to know how many rows you have in the query. Any help will be appreciated. Stack Overflow works best with JavaScript enabled. Agustin Seifert 1, 12 CSV from a text file into a record structure 7. No, his code takes that into account: 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.

  KONDRATIEFF WAVES WARFARE AND WORLD SECURITY PDF

Sign up or log in Sign up using Google. And if We want export an ClientDataset to Excel then what we do? Otherwise it may be simpler to use the csv approach which I gave in that question. Email Required, but never shown.

Reproduced Delphi DBGrid derived Excel method

The 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. All are very good points The ‘try’ is in the wrong place, though. Next; end; finally Stream. And bummi’s right; if at all possible export the underlying dataset. I suggest you start using these, then if you have specific questions about code parts not working, post them here.

Reproduced Delphi DBGrid derived Excel method

Rich Wernin Delphi Developer. Okay I will go have a look at that. FieldName ; end; s: It is working by using Tfilestream component procedure TForm2. Do not export the DBGrid, export the dataset stackoverflow. I have the feeling that I’m reinventing the wheel FieldName ; for I: Sign exort using Facebook.

Exporting can be done this way, but you can also use tstringlist. If you want a fast export of raw data, just export your recordset ADODataset.

  AKTA PENAPISAN FILEM 2002 PDF

So I made it last so that Lista doesn’t leak if it does raise an error. FieldCount – 1 do begin s: I need to export the contents of a dbGrid to a CSV file. By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service. If you dont have a recordset, you have to iterate your dataset and write excel accesing cells.

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

Post as a guest Name. CSV File Access 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. FieldCount – 1 do begin S: Quote Sergio Gonzalez wrote: I did this procedure and so far it works fine. Tue, 24 Aug Sign up using Email and Password. Thanks for the procedure!