Closed huosenyuan closed 3 years ago
@huosenyuan,
Please zip and share your Excel file, we will check it soon. Also, you may post your issue with sample file (zipped archive) as attachment in the Aspose.Cells forum.
data.zip this is excel file
I use it Examples.GridWeb , access the EXCEL form of Chinese content, and display garbled code in the browser.
Oh, by the way, the example code does not add a license file; when there are multiple sheet pages switching, it can't switch.
I opened your file into MS Excel 2016 and found this display as in the screenshot. So, I found no Chinese chars shown in the cells.
@huosenyuan,
I did test your scenario/case in a separate web project using latest Aspose.Cells.GridWeb for Java v21.3 with its latest resource files (please use latest files in acw_client folder of Aspose.Cells.GridWeb for Java v21.3) in eclipse. I used a simple .jsp page having following source code. It simply imports the “chineseData.xls” file into GridWeb and it works fine. e.g. Sample code:
%@ page language="java" contentType="text/html; charset=UTF-8"
import="com.aspose.gridweb.*,java.io.*" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<%
ExtPage BeanManager=ExtPage.getInstance();
BeanManager.setServlet(request, response);
BeanManager.setPageaction( request.getContextPath()+"/GridWebServlet");
BeanManager.setPageajaxcallpath(request.getContextPath()+"/GridWebServlet?acw_ajax_call=true");
GridWebBean gridweb=BeanManager.getBean();
gridweb.setACWClientPath("../grid/acw_client/");
%>
<%@include file="/head.jsp" %>
</head>
<BODY>
<%
gridweb.setEnableAsync(true);
gridweb.setRenderHiddenRow(true);
gridweb.setWidth(Unit.Pixel(1200));
gridweb.setHeight(Unit.Pixel(600));
String file="f:\\Files\\online excel viewer\\WebContent\\file\\chineseData.xls";
gridweb.importExcelFile(file);
gridweb.prepareRender();
out.println(gridweb.getHTMLBody());
%>
<br>
</BODY>
</html>
I am using Tomcat v7.0 server with JDK1.7 and Google chrome browser type. See the screenshot attached that shows Chinese chars are displayed fine. https://i.imgur.com/G9udg5x.png
Which browser type you are using? Please note, it does not look good in eclipse IDE editor.