1. Manos Miliaras
  2. PowerBuilder
  3. Wednesday, 19 December 2018

Hello.

Is there any (easy) way to export the presentation layer of a datawindow preferably as excel. I have searched around and haven't managed to find anything that gives you an export of "what you see" on the datawindow. My next try is probably gonna be to try to use OLE to write the data to an excel file but still unsure how that will work out.

Thanks in advance.

Miguel Leeuwe Accepted Answer Pending Moderation
0
Votes
Undo

And yes, I know it's not perfect but I have to show you this link. It's not bad either, especially for tabular / grid datwindows. Though Eduardo's code is really great, this one is quite a bit faster in exporting, not free, but not very expensive either:

http://desta.com.ua/dw2xls/

 

Comment
BTW, they have a trial version for you to see first if it's fit for purpose
  1. Miguel Leeuwe
  2. Tuesday, 19 November 2019
There are no comments made yet.
  1. Tuesday, 19 November 2019
  2. PowerBuilder
  3. # 1
mike S Accepted Answer Pending Moderation
0
Votes
Undo

You can construct at run time an external datawindow that matches the display fields (including the computes), and name each column whatever the header text is for each field (so excel has those names).  you will need to copy the data into the external datawindow then save that as excel.  Its a bit of work, but once done you should be able to use it for any export.  this works well for grid datawindows to excel.

Comment
There are no comments made yet.
  1. Tuesday, 19 November 2019
  2. PowerBuilder
  3. # 2
Olaf Brungot Accepted Answer Pending Moderation
0
Votes
Undo

How to avoid the 

 

Excel cannot open the tile ...... because of the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.

Comment
There are no comments made yet.
  1. Tuesday, 19 November 2019
  2. PowerBuilder
  3. # 3
Chris Pollach Accepted Answer Pending Moderation
0
Votes
Undo

Hi Emmanouil;

  Unfortunately, the built-in PB SaveAs () command only exports the data "as is" from the DWO's "primary" buffer (aka no formatting). You can either write an OLE interface yourself (as you already mentioned) to handle this or maybe consider an "add-on" product like DW2XLS.

FYI: http://desta.com.ua/dw2xls

Regards ... Chris

Comment
Thanks for the info.
  1. Manos Miliaras
  2. Thursday, 20 December 2018
There are no comments made yet.
  1. Wednesday, 19 December 2018
  2. PowerBuilder
  3. # 4
Eduardo G. Accepted Answer Pending Moderation
2
Votes
Undo

Here you have my development with the complete code in a link.

The code of the link of the web url doesn't work and for but that I have warned to change it they don't let me ... already I am tired.

 

Links:

Exporting Datawindows to Excel / Html without losing Format

Here the complete code

Comment
I ll check your code and see if it is fitting our needs. Thanks for the links.
  1. Manos Miliaras
  2. Thursday, 20 December 2018
There are no comments made yet.
  1. Wednesday, 19 December 2018
  2. PowerBuilder
  3. # 5
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.