lotus notes - Xpage call the agent to export excel -
i found code on website: http://www.botstation.com/code/view2excelweb.php
it mentioned agent can export views in excel format, tried use it.
i created agent called "agenttest" , paste code inside.
i used button call agent perform action.
this code set on click event (server side) button:
database.getagent("agenttest").run()
for agent basics part, set runtime trigger "on event", agent list selection , target "none".
for agent security part, checked checkbox "run web user" , choose " 2. allow restricted operations" runtime security level.
i saved , run code, did not excel file.
i tried find out problem use debug lotusscript tools , nothing happen when click button.
grateful advice on issue.
thank much.
yours faithfully,
beginner
(edit update)
i ask 1 more question base on website http://www.botstation.com/code/view2excelweb.php please.
since agent needs call url, website has been given example: http://servername/yourdatabase.nsf/webagentname?openagent&viewnametoexport
i copy url , paste in internet explorer, link can allow me save or open excel file. start think use button open url.
in button, in events, choose mouse onclick , put code in script editor:
print('http://servername/yourdatabase.nsf/webagentname?openagent&viewnametoexport');
the internet explorer shows error "the website cannot display page".
i try code button:
window.open('http://servername/yourdatabase.nsf/webagentname?openagent&viewnametoexport');
the internet explorer still shows error.
i don't know why error occurs. visit website http://www.w3schools.com/jsref/met_win_open.asp . code should fine if use window.open.
my idea in code display url in window ask me open or save excel file.
grateful advice on issue please.
sorry inconvenience.
thank much.
it's not possible print output of lotusscript agent way in xpages. if want print output of lotusscript agent need send user in same window or new window directly lotusscript agent.
but encurage you need check out poi check version of domino correct installing poi xpages if using 9.0.1 there java issues installing thru updatesites. make sure have installed latest fixpacks client.
i've created blog series how excel export using poi
Comments
Post a Comment