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 "rbuttondown" 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?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.