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!

saving data from datawindows

Status
Not open for further replies.

blaze

Programmer
Jul 16, 1999
7
US
Hey guys,<br>
<br>
I have a window with a datawindow inside of it. I want to be able to right click in the datawindow and save it as an excel file. How do I get it to do that? You guys have been great in responding. Any answers on this one? Thanks.....Hubert
 
Blaze, there are a few ways to export data from a datawindow in powerbuilder. Just one example is to place the following one line of code in the &quot;rbuttondown&quot; event for the datawindow control.<br>
<br>
dw_1.SaveAs()<br>
<br>
Of course change dw_1 to be whatever you named your datawindow control.<br>
<br>
When someone right clicks on the datawindow they will receive a response box asking for a filename to save the data to as well as a file type. The are many file types to choose from, Excel is just one of them. <br>
<br>
One line of code is all it takes to accomplish the exporting of data from a datawindow, this is one of the many reasons I like PowerBuilder so much.<br>
<br>
Hope this helped. <br>
<br>
<A HREF="mailto:tjstrecker@afscme.org">tjstrecker@afscme.org</A>
 
dwcontrol.SaveAs ( { filename, saveastype, colheading } )<br>
Filename includes path and is a string c:\myfile.xls<br>
saveastype is an enumerated datatype Excel! <br>
colheading is true or false is there a heading or isn't there?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top