How to excel download (in grid)?

One did not speak English using Google Translator. I hope you do too illogical grammar.

function doOnLoad() {
var xmlurl=“”;
mygrid = new dhtmlXGridObject(‘gridbox’);

mygrid.enableSmartRendering(true, 50);




public void planXML(HttpServletRequest request,HttpServletResponse response) throws Exception{
	response.setHeader("Cache-Control", "no-cache");
	List List=greenService.List();
	GridXML jdom = new GridXML(); 
	setInputStream(new ByteArrayInputStream(jdom.getBytes("UTF-8")));
	PrintWriter out = response.getWriter();

In this way a java create xml file by calling it, I’m working on the Web

Excel download button and told me to add

-----------------add button------------------------


Is not that, but not the execution.

How do I download a excel so I do you do?

I’m sorry it’s not enough English, and be sure to please.

If you want to export the data which is already on client side you need to use

parameter of toExcel - path to the conversion script ( not the path to XML generation script )

Thank you so much.

One more question and I’ll.

Download the name change for me what to do?

Whether the download is now heard grid.xml,

I want to give different names, depending on the circumstances.

And give them to check boxes on the front lines
gave a value of 0 for ch, depending on the situation in the very first line, it’s difficult given control?

(Not just get a new grid and receives 0’s got …?) Anyway Thanks for the heads up on how to download

Hi, there is no special API to change grid name.
If you’re using a local export script it may be customized. If you’re using our export service, there is no way to implement it.

If you’re using a local export script it may be customized. If you’re using our export service, there is no way to implement it. <<==

what’s mean local export, our export?
and how to customized change name?

Received XML2Excel How to do?

I’ve copied the entire folder to your project src/com.dhtmlx.xml2excel.

But then I do not know what to do.

Copy and put the web.xml settings are you doing?
Let me explain what to do . ;-( T_T

You have to deploy war-file on your server.
After that start deployed application.
Now you can specify path to your server in export call:


In you may customize the follow method:

private void outputExcel(HttpServletResponse resp) throws IOException, WriteException {
		resp.setHeader("Content-Disposition", "attachment;filename=grid.xls");
		resp.setHeader("Cache-Control", "max-age=0");

and instead grid.xls generate name which you want.

Thank you, but there’s still a problem.

Under the file (image) as a phenomenon that is repeated twice with the header portion,
utf-8 properly to show garbled text in less than

This represents a good result as shown above.


It's not displayed properly, as shown below.

I solve this, we want the latest source.

Anyway, thank you for letting me quickly answer. :slight_smile:

Sorry, I’ve resolved.
Project has the wrong language settings elsewhere, I guess.

do use the original that was used in the project put me right
(And the java from the bottom portion of the part makes sense because commented)
Anyway, thanks very much.