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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datawindow to Excel

Status
Not open for further replies.

wwilsonxp

MIS
May 28, 2009
8
0
0
US
Is there a way to export the datawindow to excel without the need of a special library? I have alot of different datawindows and i do not wish to use a template because it would take a long time to make a template for each and every datawindow.
 
Try to use SaveAs method:

dw_1.SaveAs(file, type, colheading, encoding)

type can be Excel5! or Excel8!

Look into PB help

Tomek
 
But when i do that it shows hidden columns in excel that isn't shown in the datawindow. So it isn't quite the same look as the datawindow. Is there a way around this?
 
Create a datastore, copy the data to the datastore, and then use the destroy modifier to get rid of any columns you don't want, and then do the SaveAs().
 
Okay that might seem to work. I'll give it a try when i get to it. My project is a long term project so i'll just add the code for now if it doesn't work out in a certain datawindow i will let you know.
THANK YOU GUYS!!! =]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top