Solved

Save in Excel

Posted on 2004-09-06
4
1,284 Views
Last Modified: 2008-03-06
Hi,

One problem, I want to save my ClientDataSet in .xls File, but I want to save with easy FieldNames .

Example:
  Field "Employee" I want the name "Employee Name" in my Field in Excel.

I was using ADO to create .xls, but the ADO make xls file with FieldNames equal to ClientDataSetNames.


Thank You!!!
0
Comment
Question by:schardosin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 11

Accepted Solution

by:
calinutz earned 50 total points
ID: 11989535
You can do whatever you want within the excel sheet:
Check out this example:
var
 i,j:integer;
 WBk: _Workbook;
 Ws: _WorkSheet;
 StartLine:integer;
 Frm:OLEVariant;
begin
StartLine:=10;
XLApp1.Connect;
XLApp1.Visible[0]:=false;
WBk := XLApp1.Workbooks.Add(EmptyParam, 0);
WS := XLApp1.ActiveSheet as _Worksheet;

 WS.Cells.Item[0,0].Value := 'Employee name';
 WS.Cells.Item[0,1].Value := 'Employee address';
 XlApp1.Visible[0]:=true;
end;


The ideea is that you can write anything to the excel worksheet
using:
 WS.Cells.Item[0,0].Value := 'your text';
Of course a dataset it's also easy to export.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Making delphi communicate with a c# service 16 136
how can i search if string exist in array ? 3 76
Delphi...Split view - idea? 1 141
Firemonkey DbLookupComboBox equivalent ? 2 76
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question