1. Moshe Tangi
  2. PowerBuilder
  3. Wednesday, 26 February 2020 15:22 PM UTC

Hello ,

 

Doe's anyone have an idea how to save dw to excel with out changing the format ?

like : colors , grouped and so on

or a 3'rd party tool

Thanks

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 28 February 2020 03:45 AM UTC
  2. PowerBuilder
  3. # 1

I've taken out the previous attachment and here is an improved, cleaner version: See attached.

The previous version pretended to take out any images, but there was a " too much, so I've also corrected that one.

TODO: include images (which I do not have the time for at this point, but I'm pretty sure it can be done).

Should get some sleep.

regards,

MiguelL

 

NOTE: I do want to state that I think dw2xls is a better solution, unless Appeon does something useful with it in a future. tongue-out

Attachments (1)
Comment
  1. Miguel Leeuwe
  2. Wednesday, 4 March 2020 02:40 AM UTC
Hi Armeen,

Not totally unexpected ! Yes, it would need some real work to make it really solid.

It's neither needed, people can simply download the sample and use the "base" pbl.

Thanks for considering though !

regards
  1. Helpful
  1. Moshe Tangi
  2. Friday, 6 March 2020 13:50 PM UTC
Hi Miguel ,

Thanks for the time and attention .

I decided to by dw2xls product witch works better for e .

take care

  1. Helpful
  1. Miguel Leeuwe
  2. Friday, 6 March 2020 14:53 PM UTC
Yes, wise decision, that's what we do also.

The results look better and the export is way faster.
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 26 February 2020 19:36 PM UTC
  2. PowerBuilder
  3. # 2

Okay,

I've made a small sample application (pb 2017 r3). This does not use dw2xls of Desta.

See attached. Unzip and add the target to one of your workspaces.

The code can be cleaned up quite a bit, I had to rip it out of our pfc classes and our own.

You need Office/Excel to be installed on your PC.

I'm using the temp folder of windows for the output of the file.

Hope it serves anyone.

Comment
  1. Moshe Tangi
  2. Thursday, 27 February 2020 15:00 PM UTC
Hi Miguel,

Thanks a lot .. I will check it out
  1. Helpful
  1. Miguel Leeuwe
  2. Friday, 28 February 2020 04:14 AM UTC
Miguel Leeuwe

You're welcome Moshe.

I've deleted this attachment and added another in my last answer. It's a bit cleaner and did not clean out any images, since there was a " too much somewhere. For now images are not supported.
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 26 February 2020 17:16 PM UTC
  2. PowerBuilder
  3. # 3

If your are going to use the Desta dw2xls libraries:

- when you plan on using it for powerserver, than you'll have to manually replace all longlong and longptr variables to long / ulong. At least that was the case the last time I did a migration to powerserver. Maybe by now powerserver supports these datatypes? Not sure about that.

Here's an alternative way suggested by Eduardo G:

https://community.appeon.com/index.php/qna/q-a/replacement-for-dw2xls-for-exporting-dws-to-formatted-excel#reply-4973

I'm having a worked out version of what Eduardo G. says. I'm not sure if that code was originally his or someone else's (it surely wasn't mine), but I had to make a few modifications to it. Can't remember why.

Let me know if you need it when you're not going to use dw2xls. 

The solution "I" have is slower but might be good enough of what you need it for and also dw2xls is not perfect with freeform datawindows, works great though for Grid type dw's.

 

Comment
  1. Miguel Leeuwe
  2. Thursday, 27 February 2020 14:09 PM UTC
Thank you Eduardo. Would you allow Appeon to incorporate that functionality under an MIT licence?
  1. Helpful
  1. Miguel Leeuwe
  2. Thursday, 27 February 2020 15:11 PM UTC
To answer my own question,I guess so, since it's on "tips and tricks" https://community.appeon.com/index.php/articles-blogs/tips-tricks-techniques-articles/17-powerbuilder/190-exporting-datawindows-to-excel-html-without-loosing-format



Thanks for that lovely peace of code.
  1. Helpful
  1. Eduardo G.
  2. Friday, 28 February 2020 10:49 AM UTC
Of course, it would be a pleasure
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 26 February 2020 17:12 PM UTC
  2. PowerBuilder
  3. # 4

I'm not aware of a way to do this in PowerBuilder itself, but there are third-party products that do this, such as DW2XLS.

Comment
  1. Miguel Leeuwe
  2. Thursday, 27 February 2020 14:10 PM UTC
Armeen,

Please see Eduardo's comment: Eduardo G.

As you say, it's my code:



Here's the article I created to have a DW visually in Excel:



https://community.appeon.com/index.php/articles-blogs/tips-tricks-techniques-articles/17-powerbuilder/190-exporting-datawindows-to-excel-html-without-loosing-format



Here to download all the source code:



https://drive.google.com/file/d/1XUNdg7RAXM4mj-xVuy3vsC0HSdvS1lV9/view?usp=sharing



Greetings.

Eduardo G. Thursday, 27 February 2020

  1. Helpful
  1. Miguel Leeuwe
  2. Friday, 28 February 2020 03:55 AM UTC
Armeen, I've just now sent the email to product@appeon.com

cheers
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Friday, 28 February 2020 04:08 AM UTC
Thanks!
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 26 February 2020 16:22 PM UTC
  2. PowerBuilder
  3. # 5

Hi, Moshe -

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

Regards, John

Comment
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.