A question on Natural for ajax and excel.

Hello, I Am in a company where the Natural has installed to himself for Ajax and the Natural for Eclipse, at this company they are employed very much with leaves(sheets) excel. Can Ajax create Leaves(Sheets) excel ?. If there can which is the control to using.
Thank you very much and a greeting

GRID data displayed in a NJX page (natpage) can be exported to Excel using a Document Listener. The attached .zip file contains a primitive prototype of such a Document Listener and a NJX example using it. Moreover, a little bit of documentation and a README file explaining details.

Thanks to Christine Zimmermann for valuable advice!

Excel.zip (3.07 MB)

I downloaded the file, but am not sure how to use it. It seems to be a PHP file?

Is there perhaps some documentation that you might be willing to share on how to use a document listener?


No, PHP is not involved at all.

Did you see the Readme.txt file inside Excel.zip?
It describes the content of the ZIP and also contains instructions on how to use the enclosed listener “njx2excel.MyExcelDocumentListener”.

Of course, you will need a working NJX environment to run the example.
Also, be aware that the example is very primitive an requires further refinement to be used in a real application.

Let me know if you still have questions.


I realized what the problem was after I posted my question. The extension should be .ZIP and not .PHP. Once I renamed the filename it works fine. Thanks again.

Hi Christine,

Thanks for info. I have not been able to get back to this until now :slight_smile:

Would it be possible to include the Excel listener as a standard feature in a future version NJX?

Also, I have follow-up question. I was able to get the Excel listener working on a test/development JBoss working. On the production server, the popup for where you want to save the file does not appear. I was wondering if there is anything that needs to be tweaked? For example, I did not know if I do anything with the “application/vnd.ms-excel” mentioned in the README.TXT - not sure where to make the change. Looked at the bin directory of JBOSS but did not see where I could make the change.

Update: The issues seems to me that it works on a local machine, but once you use a server on a remote machine from your browser, the excel save option does not appear. Any advice or suggestions on how to proceed? Thanks.

Hi Demos,

It might be a stupid question but:
Does your browser block popups from other sites?
This might explain that it works with localhost, but does not with other sites.

Best Regards,