1. Sim Joo Pee
  2. PowerServer
  3. Thursday, 28 September 2023 08:21 AM UTC

Hi All,

I am having the issue when "save as excel with format", null object reference error. Hence i included pb2xls.dll into the external files and build the cloup app. However, when i launch my cloudapp, it displayed this 'Do you want this to make changes to your device....?"(see attachment). How to bypass this message?i do not want this message to prompt. Please advice thanks.

Attachments (1)
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Thursday, 28 September 2023 14:23 PM UTC
  2. PowerServer
  3. # 1

When you added the pb2xls.dll, did you select option to register the DLL?  If the DLL requires registration then user must have admin rights.

Comment
  1. mike S
  2. Thursday, 28 September 2023 17:25 PM UTC
i don't think it requires registration, so if you did select that then unselect it and double check that it still works
  1. Helpful
  1. Miguel Leeuwe
  2. Thursday, 28 September 2023 19:34 PM UTC
Mike is right, it doesn't need registration, that's why I asked in case doing so migh cause a problem.
  1. Helpful
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Thursday, 28 September 2023 12:22 PM UTC
  2. PowerServer
  3. # 2

the warning message has nothing to do with dw2xls.

it is about installing the APPEON installer (cloud launcher) for powerserver.  

Comment
  1. Armeen Mazda @Appeon
  2. Thursday, 28 September 2023 14:22 PM UTC
The Cloud App Launcher manages installing 3rd party DLLs that have been packaged in the app, such as pb2xls.dll. So it is possible the Cloud App Launcher was already installed without admin rights and the installation of the pb2xls.dll is what requires admin rights.
  1. Helpful
  1. mike S
  2. Thursday, 28 September 2023 17:23 PM UTC
pretty sure pb2xls.dll does not require admin rights. but i could be wrong.
  1. Helpful 2
  1. Miguel Leeuwe
  2. Thursday, 28 September 2023 19:34 PM UTC
you're right Mike
  1. Helpful
There are no comments made yet.
Brage Mogstad Accepted Answer Pending Moderation
  1. Thursday, 28 September 2023 11:28 AM UTC
  2. PowerServer
  3. # 3

Just a thought,
If power server is aprox the same as the old Jaguar CTS, you should be able to code in PB script. If it's the same as Powerdynamo, then it's another ball game, and powerscript is not cutting it.
If it is powerscript compatible, consider using Salve as HTML on datastores and convert that file to excel or .doc using OLE over third party dll.
You'd save a massive amount of time as compared to C# export and perhaps as good but cheaper than the third party tool you plan to use.
It preserves the GUI better than most convert programs I've seen, not to mention the native SaveAs Excel and doc pbscript functions that basically only save the columns retrieved in SQL/Spr as displayed in detail band of dwo.

The native Excel functions are still not very smooth if you want wysiwyg.
We allow the user to select WYSIWYG in a setup that basically is OLE. Excel goes pretty much like this:

dwo.SaveAs( ls_docname, HTMLTable!, TRUE ) 
oleobject myoleobject, lole_Sheet
myoleobject = CREATE OLEObject
myoleobject.ConnectToNewObject("Excel.Application")
myoleobject.Application.DisplayAlerts = False
myoleobject.Workbooks.Open(ls_docname)
lole_Sheet = myoleobject.ActiveSheet
lole_Sheet.Cells.Borders.LineStyle = 0
myoleobject.Activeworkbook.SaveAS(ls_xls, 1)
myoleobject.Workbooks.close()
myoleobject.quit()
myoleobject.DisconnectObject()


Word goes like this:

oleobject myoleobject, lole_Sheet
myoleobject = CREATE OLEObject
myoleobject.ConnectToNewObject("Word.Application")
myoleobject.Documents.Open(ls_docname)
if ll_orientation = 1 then
	myoleobject.ActiveDocument.PageSetup.TogglePortrait
end if			
myoleobject.ActiveDocument.SaveAs(ls_word)
myoleobject.quit()			
myoleobject.DisconnectObject()



The other option is to scan the dwo for columns & computed fields, what bands they reside in.

ls_syntax = sqlca.SyntaxFromSQL(as_sql,'style(type=grid)',ls_errors)
ll_ret = lds.create(ls_syntax,ls_errors)
ll_ret = lds.SetTransObject(sqlca)
ll_ret = lds.Retrieve()



Then map it together using data syntax.
lds.Object.Data.Primary.Current[1,ll_colid_new,ll_count,ll_colid_new] = adw_dwo.Object.Data.Primary.Current[1,ll_colid,ll_count,ll_colid]

Regards
Brage

Comment
There are no comments made yet.
Sim Joo Pee Accepted Answer Pending Moderation
  1. Thursday, 28 September 2023 09:58 AM UTC
  2. PowerServer
  3. # 4

I am on PB2022 Build 1900. THe 'warning' message prompt when i try to launch my cloud app. Not yet saving the file.

Comment
  1. Miguel Leeuwe
  2. Thursday, 28 September 2023 11:05 AM UTC
ok,

Have you specified the DLL to be "registered" or something like that?
  1. Helpful
  1. Miguel Leeuwe
  2. Thursday, 28 September 2023 11:09 AM UTC
We also have dw2xls, but we use no powerserver. At the end of the day, when I have some time, I'll try to reproduce the problem, but no guarantee, very busy right now.

regards
  1. Helpful
  1. Miguel Leeuwe
  2. Thursday, 28 September 2023 11:11 AM UTC
Could you make a small sample application to try and reproduce the problem?
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 28 September 2023 09:25 AM UTC
  2. PowerServer
  3. # 5

Hi,

A lot of information is missing, but I suppose you are using dw2xls.pbl from Desta?

Maybe you are trying to save the excel file in a protected folder of windows?

Make sure that the user that is running powerserver on the server has rights to save in the folder that you try to save to.

regards

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.