1. Russell Lawton
  2. PowerBuilder
  3. Thursday, 24 September 2020 13:57 PM UTC

I'm exporting data from a Datawindow and saving it in excel. The following is the code that does that.

 

value = GetFileSaveName("Save Report as", & docname, named, "xls", &" Excel Files (*.xls), *.xls")

IF value = 1 THEN

dw_1.Saveas(docName,Excel!,TRUE)  

 

When I open the excel file that has been created, I get the following message: "File error:dData may have been lost".

Is there anything that can be done to fix this error?

Andreas Mykonios Accepted Answer Pending Moderation
  1. Friday, 25 September 2020 10:10 AM UTC
  2. PowerBuilder
  3. # 1

Hi.

For XLS, I believe that it's better to test with excel8!

Of course it depends on the version of Powerbuilder you are using.

Andreas.

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Thursday, 24 September 2020 18:22 PM UTC
  2. PowerBuilder
  3. # 2

Greetings, Russell -

Have you tried the XLSX format instead? That is a newer Excel format and is capable of handling larger (number of rows) datasets.

However, to be able to successfully save in XLSX format you need two additional runtime DLL's:

PBDWExcel12Interop190.dll
Sybase.PowerBuilder.DataWindow.Excel12.dll

Note: The "190" in the DLL filename corresponds to the PB 2019 version of PowerBuilder. The filename changes in each major version of PB.

Regards, John

Comment
  1. Olan Knight
  2. Friday, 25 September 2020 00:13 AM UTC
I agree.

Try using the Excel5 With Headers option.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 24 September 2020 15:06 PM UTC
  2. PowerBuilder
  3. # 3

Hi Russel;

  I have never personally experienced this issue before in any PB release.

  Would you have a simple Test Case that you can attach to this post?

  (ie: DWO source and some test data - say in CSV format)

Regards ... Chris

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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.