Forums de discussion
displaytag table export to excel japanese encoding
Michael Anthony Dorrian, modifié il y a 14 années.
displaytag table export to excel japanese encoding
Junior Member Publications: 98 Date d'inscription: 03/09/09 Publications récentes
How do i set the character encoding of the excel files i export from my liferay portlet. The japanese text displays fine and here is my header and body of my jsp file. As you can see i tried to set the request character encoding but stil the japanese text in my exported excel file is ??. Any ideas?
<jsp:scriptlet> request.setAttribute( "testData", testData );
request.setCharacterEncoding("utf-8");
</jsp:scriptlet>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Fund Details</title>
<link href="/html/portlet/ext/library/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<display:table name="testData" id="test" pagesize="15" export="true" requestURI="/com/ext/portlet/library/action/ViewFundsAction">
<display:column title="FundCD" property="FundCD"/>
<display:column title="FundName" property="FundName" />
<display:setProperty name="export.excel.class" value="org.displaytag.export.excel.DefaultHssfExportView"/>
<display:setProperty name="export.excel.filename" value="FundDetails.xls"/>
<display:setProperty name="export.csv.filename" value="FundDetails.csv"/>
<display:setProperty name="export.xml.filename" value="FundDetails.xml"/>
</display:table>
</body>
</html>
<jsp:scriptlet> request.setAttribute( "testData", testData );
request.setCharacterEncoding("utf-8");
</jsp:scriptlet>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Fund Details</title>
<link href="/html/portlet/ext/library/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<display:table name="testData" id="test" pagesize="15" export="true" requestURI="/com/ext/portlet/library/action/ViewFundsAction">
<display:column title="FundCD" property="FundCD"/>
<display:column title="FundName" property="FundName" />
<display:setProperty name="export.excel.class" value="org.displaytag.export.excel.DefaultHssfExportView"/>
<display:setProperty name="export.excel.filename" value="FundDetails.xls"/>
<display:setProperty name="export.csv.filename" value="FundDetails.csv"/>
<display:setProperty name="export.xml.filename" value="FundDetails.xml"/>
</display:table>
</body>
</html>
Jigna parag Joshi, modifié il y a 14 années.
RE: displaytag table export to excel japanese encoding
Junior Member Publications: 41 Date d'inscription: 09/12/08 Publications récentes
Hi,
I am using Liferay's Search Container for Organization searching..
now, i want to export this result to excelsheet...i think u ve done in your portlet..
can u give me some guidelines..
thanx,
Regards,
Jigna Joshi
I am using Liferay's Search Container for Organization searching..
now, i want to export this result to excelsheet...i think u ve done in your portlet..
can u give me some guidelines..
thanx,
Regards,
Jigna Joshi