Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Heading values for SaveAs with Excel 1

Status
Not open for further replies.

KevinYearian

Programmer
Jun 28, 2001
4
US
I am using SaveAs() to save a datastore as an excel spreadsheet with headers. My problem is that the column headings contain in the saved spreadshee show the dbname value of the column, not the text values from the datawindow headers.

Is there a way to make make the spreadsheet column headings be the text values from the Datawindow's header band?

Thanks,
KevinYearian
 
1. First save that datawindow as html file format.
2. Internally create OLE object of excel application
3. Open the html file in the excel.
4. Saveas the html file as xls file format.
5. Close the excel application



 
hmmm...there is an easier way for this problem

modify ur select statement from

SELECT sn,
gn
from employees

to

SELECT sn as Employee_Surname,
gn as Employee_GivenName
from employees

cheers
MM
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top