DelphiFeeds.com

  • Dashboard
  • Popular Stories
  • Trending Stories
  • Feeds
  • Login
Trending now

The IFDEF Problem!

Quickly Build Natural Language Processing Capable GUI Apps With Delphi And Python NLTK

Freebie Friday: capture controls or forms

Easily Learn How To Use Python List Comprehensions In A Delphi Windows GUI App

Powerful Native Open Source Hard Disk, Folder and Storage Analyzer Built In Delphi

Incredible Database Development And Visualization Tool Is Built In Delphi

User Defined Functions with InterBase

Learn How To Use C++ Extending Sizeof For Windows Development

Learn How Easy It Is To Apply Updates With TFDQuery.OnUpdateRecord In Delphi

4 Ways to Generate Quick Test Ideas

Measure Heart Rate Using Delphi And C++ Builder With The Power Of ThingConnect IoT Device ...

Learn How To Use Python Dictionaries In A Delphi Windows GUI App

Create Enterprise-Grade WebSockets Based Apps With Powerful Components For Delphi

If you use an implementation of TNonRefCountInterfacedObject, then document in the descendants how lifetime management ...

High DPI Support, Improved TIFF and New Performance Demo in ImageEn Imaging Library v9.3.0

Delphi Tip of the Day – Export to CSV

1
Michael Riley Michael Riley 9 months ago in csv, dataset, firedac, tip-of-the-day 0
This weekend I had a bunch of data inside a FireDAC FDMemtable and I wanted to play around with that data in Excel. So, the first thing I did was review which data formats Excel would accept.


That's excellent! Excel allows both importing from XML and JSON both of which can done using FDMemtable.SaveToFile method. ( SaveToFile documentation )

I created an XML file using the SaveToFile method and then tried to import that file into Excel.


That didn't go so well. Where's my data? I'm starting to feel that "I hate Delphi" thing happening again! Let's try JSON. So. I created a JSON file using the SaveToFile method and then tried importing into Excel. 

"I just want the data in Excel."



That didn't go so well either. I've imported text files hundreds of times into Excel and it just worked. I wasn't in the mood to figure out what was going on. I'll save that for another day. I just want the data in Excel. 

"I know CSV works. Let's find a solution."


I know that text or csv files import just fine into Excel so let's see how to create a CSV file using Delphi. A quick google search turned up exactly what I was looking for, a simple solution written by Uwe Rabbe six years ago. Thank you Uwe!

https://www.uweraabe.de/Blog/2013/11/06/poor-mans-csv-export/
[Archive]

This works with any TDataSet descendent! And just like that I love Delphi again.




Enjoy - Semper Fi
Gunny Mike
https://zilchworks.com

Feedback is always appreciated!

Trending Stories

  • The IFDEF Problem!

  • Quickly Build Natural Language Processing Capable GUI Apps With Delphi...

  • Freebie Friday: capture controls or forms

  • Easily Learn How To Use Python List Comprehensions In A...

  • Powerful Native Open Source Hard Disk, Folder and Storage Analyzer...

Embarcadero GetIt

  • Brook Framework

    Microframework which helps to develop web Pascal applications.

  • Trial - TMS Scripter

    Add the ultimate flexibility and power into your apps with native Pascal or Basic scripting and […]

  • Trial - TMS VCL Chart

    DB-aware and non DB-aware feature-rich charting components for business, statistical, financial […]

  • Trial - TMS VCL Cloud Pack

    TMS VCL Cloud Pack is a Delphi and C++Builder component library to seamlessly use all major cloud […]

  • Trial - TMS VCL UI Pack

    Create modern-looking & feature-rich Windows applications faster with well over 600 components […]

  • Learn Delphi Programming
  • Learn C++
  • Embarcadero Blogs
  • BeginEnd.net
  • Python GUI
  • Firebird News
  • Torry’s Delphi Pages
Copyright DelphiFeeds.com 2021. All Rights Reserved
Embarcadero
Login Register

Login

Lost Password

Register

Lost Password