1. Andrei Valentin Darie
  2. PowerBuilder
  3. Monday, 15 February 2021 14:21 PM UTC

Hi , 

We have problem when we use SaveAs from Datawindow. When we will try SaveAs XLSX . Our software stop works when try to save as XLSX. The others formats works correctly when we save the data. 

Windows event viewer shows error :

I check other questions on Appeon community and tried different solution but didn´t work. 

Someone had same problem?

Regards, 

Andrei 

John Fauss Accepted Answer Pending Moderation
  1. Monday, 15 February 2021 15:06 PM UTC
  2. PowerBuilder
  3. # 1

Hi, Andrei -

It would be most helpful if you would let us know what version, release, & build of PB you are using.

In the PB Help, look at the help topic "runtime files" and get the names of the DLL's for "Excel 2007". Make sure these DLL's are included with the other PB runtime DLL's that your app uses.

Regards, John

Comment
  1. Andrei Valentin Darie
  2. Tuesday, 16 February 2021 07:15 AM UTC
Hi, We use Appeon 2017 R3 and the dll is correct installed. I see that instrucctions in other post.
  1. Helpful
  1. John Fauss
  2. Tuesday, 16 February 2021 22:57 PM UTC
There are TWO dynamic link libraries listed: PBDWExcel12Interop170.dll is one and Sybase.PowerBuilder.DataWindow.Excel12.dll is the other. Are both properly deployed with the other PB 2017 R3 runtime DLL's?

I would also recomment you first try to save a small test case first to ensure the functionality is working before trying to save a very large amount of data from a DataWindow or DataStore. Test this on your development machine, running locally (not through Citrix or remote desktop by running the test case or app from the PB IDE, if possible. Verify the functionality is working in a simple environment before adding complexity to the scenario. Then try the small test case as a compiled app - again locally, if possible. If that works, run the test case app on a test Citrix environment or test on a remote desktop. Take baby steps.

Once the small test case is working across the deployment spectrum, go back to the running from within the PB IDE and try saving the very large dataset. Follow the same testing steps with the very large dataset that you did with the small test case.
  1. Helpful
  1. Andrei Valentin Darie
  2. Wednesday, 17 February 2021 07:35 AM UTC
Yes, I tried different quantity of data in different computers and that work. But the max data without application crash is different between those environment. If test save as XLS i can se when the application create the file. When I saveas to XLSX and the application crash the file is not created. But if take few data works correctly. Can be problem with how .NET Framework create the XLM structure for XLSX file in the memory?
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 15 February 2021 16:24 PM UTC
  2. PowerBuilder
  3. # 2

Hi Andrei;

  As you can see from your mini-dump, the error occurs in the O/S "Kernel" and not PB.

   Saving to XLSX is Excel12 and that requires a .Net DLL from PB to be deployed plus the correct .Net run-time from Microsoft to be installed as well.

  You can read about these dependencies in the PB Help under the keyword "runtime" search.

HTH

Regards ... Chris

Comment
  1. Andrei Valentin Darie
  2. Tuesday, 16 February 2021 07:16 AM UTC
Yes, We have installed installed .NET Framework 4.6.1 and check DLL with GACUTIL.exe .

  1. Helpful
There are no comments made yet.
René Ullrich Accepted Answer Pending Moderation
  1. Tuesday, 16 February 2021 06:41 AM UTC
  2. PowerBuilder
  3. # 3

Hi Andrei,

You need to deploy the assembly Sybase.PowerBuilder.DataWindow.Excel12.dll in the correct version with your application (and .NET runtime). 

If it still not works try to install the DLL in the same directory as your application EXE file. This works for me if I don't want to install/register the DLL.

HTH,

René

 

Comment
  1. Andrei Valentin Darie
  2. Thursday, 18 February 2021 11:39 AM UTC
Hi , If you have saveAs function in your program . Can You try to save data as XLSX over 200.000 rows or more?. will be interesting if you have same problems.
  1. Helpful
  1. René Ullrich
  2. Thursday, 18 February 2021 12:52 PM UTC
I've checked with 210000 rows and lots of columns and it works (excel file > 34 MB). But it may be a memory problem because it consumes a lot of memory.
  1. Helpful
  1. Andrei Valentin Darie
  2. Friday, 19 February 2021 07:54 AM UTC
Yes,I can think on that because I think when save the data first create all data structure on memory and after that , save the data on the file. When I exported with my laptop more than 300,000, the program crash.
  1. Helpful
There are no comments made yet.
Andrei Valentin Darie Accepted Answer Pending Moderation
  1. Tuesday, 16 February 2021 07:14 AM UTC
  2. PowerBuilder
  3. # 4

Hi

We use Appeon 2017 R3 but i tested to deploy our software with Appeon 2019 and we have same problem.

I checked DLL with GACUTIL.exe and i can see the Sybase.PowerBuilder.DataWindow.Excel12.dll on gacutil register.

We have installed .NET Framework 4.6.1.

The problem shows when try to save huge quantity of data. But we have problem on several Citrix and TS servers with few data too.

I can try to save a Data capture with procmon utility from Sysinternals. 

I could see the application do not create the XLSX file before our program crash.

Regards,

Andrei

 

 

 

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 18 February 2021 16:27 PM UTC
Adding to Armeen's suggestions ... save the large data as a CSV file and then let Excel import it.

Tip: You can also save the CSV file with extension .XLS so that the Excel import is done when the user double-clicks the file from explorer. ;-) HTH
  1. Helpful
  1. John Fauss
  2. Thursday, 18 February 2021 17:04 PM UTC
I seem to remember that the XLS format cannot handle more than 64K rows, so that might prevent consideration of the older XLS format. I like Chris' idea of saving the data in CSV format. I hope that works for Andrei.
  1. Helpful
  1. Andrei Valentin Darie
  2. Friday, 19 February 2021 07:48 AM UTC
Hi , thank for all comment. We work with differents client and few of them had new requirements to save in XLSX format. Yes we can try to manage the requiements to save data in other data format but that was not the priority of thats clients :( . Yes , XLS works fine only problem is how much data can be saved 64K max , will need to think to split data. I will create a ticket in appeon support page, the problem is ambigous . Regards, Andrei.
  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.