How to export multiple TdxDBGrid into an Excel worksheet? - delphi

In our application we are having different grids in a form having individual Export to Excel functionality. DevExpress do not provide the functionality to Export multiple grids into an Excel worksheet. How this can be done in Delphi 2007?
Thanks!

https://stackoverflow.com/search?q=%5Bdelphi%5D+export+excel
Exporting data from a DBGrid to Excel
Exporting grid to excel + OOXML mentions TdxDBGrid
Exporting to excel from Delphi without having excel
How can I export a DBGrid to OOXML format (Excel 2007/2010 format) without Excel installed?
ADO with XLSX files in Delphi XE
Copy TDataSet to XLS via ADO
You can start with either of those approaches and make your export routines. 1st of all you would have to decide whether you would place your different grids onto different sheets within the workbook, or into different files, or left to right in the same worksheet.
Maybe most lazy approach would be to export them to different worksheets, and after that using Excel's COM server (via Delphi TExcelApplication component) to move those sheets into one main workbook, and then close and delete all the temporary and now empty workbooks.
This would be quite non-effective approach, but might appear most easy if you already mastered built-in DevEx exporter.
Otherwise those links above have a lot of references to purchase some exporter or create one.

Related

Printing ReportBuilder Reports to Excel in Delphi XE

We used to use ExtraDevices to print ReportBuilder Reports to Excel. Unfortunately, there seems to be no support for Delphi XE.
Can someone suggest an alternative way to print a ReportBuidler Report to Excel? It doesn't have to be a free solution, though an open source option is always preferable.
I am currently considering Gnostice and ReportBuilder Export Devices Pro
Our only requirement is to be able to print to Excel, so my initial sense is that option 2 might be a better fit.
How reliable are these tools? And, can someone suggest other alternatives? We do not need to print to PDF.
Thank you!
This may be too late now but I am leaving this response for anyone else who might be interested in it. (I am from Gnostice.) If you are using eDocEngine, there are three ways to save the report as XLS. Instead of the PDF engine component used in this article, use our XLS engine component. You can enable the print to file option and let it save to an XLS file. You can also use a RTM template, load it with data and print to file. You can also create a RAF file and also render it to XLS without any user interaction.
http://www.gnostice.com/nl_article.asp?id=243&t=Export_From_ReportBuilder_To_PDF_And_Other_Formats

Export Crystal Reports 2011 to MS Excel 2010

We are currently using Crystal Reports 2011 and Excel 2010. Some of our reports have 65k rows and would like to export those file into Excel 2010 file. I found out I am able to export all the data into one sheet if I choose "Microsoft Excel Workbook Data Only" as Excel Export Format but we would like to keep the format and layout as well. Is there any way to export the report which has more than 65k rows into only one sheet of Excel 2010 with formatting? I believe one sheet in Excel 2010 is able to have a million rows.
Thank you.
I found out that Export to .xlsx is only supported by the Excel Workbook Data Only option and CR 2011 will export data into multiple sheets since the .xls format has the 65k limit. If can't preserve formatting and export to .xlsx - the feature isn't available yet.

How to customize the filters in the Quickreport saveas dialog?

In Quickreport, when we click Save button, it will appears many option of extension (QuickReport file(.qrp), Excel spreadsheet (.xls), and so on).
I just need to display only QuickReport file as a filter extension option? Is it possible? I read QuickReport Help but found nothing.
Quickreport version 4.06
Find and delete (or comment out) the qrextra and qrhtml units in your uses clause, and remove the corresponding componnents (TQRXLSFilter, TQRExcelFilter, TQRHTMLDocumentFilter, TQRAsciiExportFilter, TQRCommaSeparatedFilter, TQRRTFExportFilter, and TQRWMFExportFilter) from any forms in your application. You'll find the full list of all of the available standard export filters in QRExport.pas.
(It's often important to include the version of any third party components you're using, particularly those that change drastically between versions such as QuickReports or Indy, in order to make it easier to answer your question.)

Delphi4 XE / iOS / read XML file /

Am I correct in that Delphi 4 XE Pro does not supply any native way of reading XML documents? (TXMLDocument is Windows only) I have pondered about using TClientDataSet, but I am not sure if that is the right way to go.
Here is an example of what I want:
Readonly XML file that defines a list of contacts. In the XML file, it also contains e.g. file path to photo of contact.
Ideally I then want to show the data in e.g. a TListBox (which might mean I need to write my own logic for loading images in/out of memory.)
If validation is not required (as in the linked answer above), try
NativeXml
or
OmniXML
Both are free open source libraries for Delphi, however I have not checked if they can be used on other platforms.
Update: see http://www.kluug.net/omnixml.php and Windows & Mac XML library for delphi XE2

Delphi - How to save multiple Rave reports to one pdf file?

I have multiple rave reports(projects) in the project(the delphi project) and I want to save them all in one pdf file. How can I do it?
While I don't have any real experience with Rave reports, I also had to perform stitching of multiple "pdf" pages to a single pdf document. I ended up using Gnostice PDFToolkit to do the final merge and it works quite well. In my case I was generating multi-thousand page documents, so i'm sure it will fit your needs.
Does Rave already export to PDF? If so then there are a number of libraries that support merging of PDFs programmatically. The main difference between them will be how many files they can merge at once (some support only two and some support merging a full array at once) and how quickly the output is produced.
If Rave doesn't already export to PDF, however, then you'd likely need a printer driver based PDF component. The idea would be to tell Rave to print the report to a named virtual printer, then use the printer driver based component to capture that print job as a PDF. Once you've got the PDF, you can do the merge.
It's been years since I've personally worked with Rave (last time was in the C++Builder/Delphi 6 days) but hopefully this helps. If you need more info just let me know, I worked at Borland for a long time (before they became Embarcadero) and now work with PDF toolkits for developers.

Resources