1. Ivan Aase
  2. PowerBuilder
  3. Thursday, 14 December 2023 09:41 AM UTC

Hi,

We are using saveas to excel from datawindow. 

While doing so we want to the Datawindows column heading as heading text in Excel. Is there any way to achieve so ?

As for now it's always the datatable (sql select) column name that is refered in the Excel sheet..

 

 

Bruce Armstrong Accepted Answer Pending Moderation
  1. Friday, 15 December 2023 17:42 PM UTC
  2. PowerBuilder
  3. # 1

What John said, for now we also export using OLE.  There is also dw2excel (http://desta.com.ua/dw2xls/).  I haven't used it, but it does seem popular.  Also note that during Elevate 2023, Appeon did indicate that exporting to Excel with formatting would be a feature of PB 2025 (https://community.appeon.com/index.php/blogs/recent-blogs/elevate-2023-review).

Comment
  1. Ivan Aase
  2. Friday, 15 December 2023 17:50 PM UTC
Thank you !



I will lock into this suggestion.

  1. Helpful
There are no comments made yet.
Philippe PILAT Accepted Answer Pending Moderation
  1. Thursday, 14 December 2023 14:49 PM UTC
  2. PowerBuilder
  3. # 2

Hi Evan,

have you tried with SaveAsFormattedText  ?

HTH

Philippe.

Comment
  1. Ivan Aase
  2. Friday, 15 December 2023 13:55 PM UTC
As I see it, there is no function with that name on a Datawindow.

Where do you find SaveasFormattedText ?
  1. Helpful
  1. Philippe PILAT
  2. Friday, 15 December 2023 13:59 PM UTC
Ivan,

found this method in the help (PB 12.5)

SaveAsFormattedText method (DataWindows)
  1. Helpful
There are no comments made yet.
Ivan Aase Accepted Answer Pending Moderation
  1. Thursday, 14 December 2023 14:22 PM UTC
  2. PowerBuilder
  3. # 3

Hi, 

 

that could work as one workaround, thank's.

The only problem I can see is that computed fields would be missed and you have to format the dataelement in the sql for the datawindows, or ?

regarding computed field, it looks like they are missed anyway.

 

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 14 December 2023 13:33 PM UTC
  2. PowerBuilder
  3. # 4

Hi Evan;

    What I've always done in any version of PB before & current is to create a 2nd DWO where the column names are the exact ones that I want the Excel user to see. You can even affect the data presentation as well. Then copy the current DWO data over to the 2nd DWO running in a DataStore & then perform the SaveAs() on the DS. HTH

Regards... Chris 

Comment
There are no comments made yet.
John Raghanti Accepted Answer Pending Moderation
  1. Thursday, 14 December 2023 12:14 PM UTC
  2. PowerBuilder
  3. # 5

I think that PB 2022R3 may have some enhancements to this? Before that SaveAs only exports the data columns, not the visual representation of the datawindow.

You'd have to do your own Excel integration if you want the data formatted.

Comment
  1. Ivan Aase
  2. Thursday, 14 December 2023 14:25 PM UTC
Hi,



Have already done that, but there are some problem regarding that is to old and are more as one Excel 2003 version.

It also take some time to export data that way, so we have to look into it. And in that we had one hope that the saveas would help us,
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


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