1. Balasubramaniam N
  2. PowerBuilder
  3. Thursday, 31 October 2019 11:07 AM UTC

Hi Guys,

I am trying to save the datawindow report as excel file, so that I am using the below syntax. Excel file is saved successfully buy I am unable to open it. It showing "file format or file extension  is not valid" error. suggestions please.

Getfilesavename("select file",lspath,lsfile,"xlsx","*.xlsx,*.*",lssavelocation,32770)

 

 

Who is viewing this page
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 31 October 2019 18:15 PM UTC
  2. PowerBuilder
  3. # 1

Hi Balasubramaniam ;

  You will probably have to contact the "DW2XLS" software vendor for your answer as this is not a PowerBuilder command but one from the 3rd party tool itself.

Regards ... Chris

Comment
There are no comments made yet.
Balasubramaniam N Accepted Answer Pending Moderation
  1. Thursday, 31 October 2019 13:25 PM UTC
  2. PowerBuilder
  3. # 2

Hi Michael,

Am not using Saveas() method, because I want the formatted data not the raw data. While export the datawindow, I am getting the file name from the user by the below syntax.
     Getfilesavename("select file",lspath,lsfile,"xlsx","*.xlsx,*.*",lssavelocation,32770)

And then calling uf_save_dw_as_excel() library function from DW2XLS.Pbl.

System details: PowerBuilder 2019, Excel 2016.

Here I have a doubt, do we need to download DW2XLS library file for PowerBuilder 2019 separately?

 

Comment
There are no comments made yet.
Michael Kramer Accepted Answer Pending Moderation
  1. Thursday, 31 October 2019 11:33 AM UTC
  2. PowerBuilder
  3. # 3

What is the exact name of the file that you try to open?
Filename including extension/filetype.

What is the statement you used to save your DataWindow content to file?
Like dw_xxx.SaveAs( ls_filename, XXXX )
It is this XXXX I'm curious of!

HTH /Michael

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.