Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6932571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:43:22+00:00 2026-05-27T11:43:22+00:00

I using jexcelapi for android . I write string Hello jExcelAPI!, but when I

  • 0

I using jexcelapi for android.

I write string “Hello jExcelAPI!”, but when I read I see Chinese symbols.

How I can fix it?

Thanks in advance.

P.S. Maybe it help: I dont know what need give in ws.setCharacterSet(cs);

enter image description here

package ru.elvigl.hello;

import java.io.File;
import java.io.IOException;
import java.util.Locale;

import jxl.Cell;
import jxl.Sheet;
import jxl.Workbook;
import jxl.WorkbookSettings;
import jxl.read.biff.BiffException;
import jxl.write.Label;
import jxl.write.WritableSheet;
import jxl.write.WritableWorkbook;
import jxl.write.WriteException;
import jxl.write.biff.RowsExceededException;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

public class HellojExcelAPIActivity extends Activity {

    final File file = new File("/sdcard/Folder/File.xls");

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }

    public void btnExport_Click(View v) throws IOException, RowsExceededException, WriteException {
        WorkbookSettings ws = new WorkbookSettings();

        //ws.setCharacterSet(cs);
        ws.setEncoding("Cp1251");
        ws.setExcelDisplayLanguage("RU");
        ws.setExcelRegionalSettings("RU");
        ws.setLocale(new Locale("ru", "RU"));

        WritableWorkbook workbook = Workbook.createWorkbook(file, ws); 
        WritableSheet sheet = workbook.createSheet("First Sheet", 0); 

        Label label = new Label(0, 0, "Hello jExcelAPI!");
        sheet.addCell(label); 

        workbook.write();
        workbook.close(); 
    }

    public void btnImport_Click(View v) throws BiffException, IOException {

        WorkbookSettings ws = new WorkbookSettings();

        //ws.setCharacterSet(cs);
        ws.setEncoding("Cp1251");
        ws.setExcelDisplayLanguage("RU");
        ws.setExcelRegionalSettings("RU");
        ws.setLocale(new Locale("ru", "RU"));

        Workbook workbook = Workbook.getWorkbook(file, ws); 
        Sheet sheet = workbook.getSheet(0); 
        Cell a1 = sheet.getCell(0,0); 
        String str = a1.getContents();

        TextView tv = (TextView) findViewById(R.id.tvCellValue);
        tv.setText(str);
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T11:43:23+00:00Added an answer on May 27, 2026 at 11:43 am

    Here is the documentation for the class “WorkbookSettings”: http://jexcelapi.sourceforge.net/resources/javadocs/2_6_10/docs/jxl/WorkbookSettings.html It appears that the method “setCharacterSet” is only used for reading (importing) a spreadsheet, not exporting if that helps. As for the Chinese characters, I think they are displaying due to your Locale. I would use these constants to correctly instantiate your Locale object with the proper language and country constructor parameters: http://docs.oracle.com/javase/1.4.2/docs/api/java/util/Locale.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using PyObjC , you can use Python to write Cocoa applications for OS X.
Using the HTML5 File API I can get the Binary String representation of a
Using the current request I can get the URL hostname with: HttpContext.Current.Request.Url.Host But -
I'm using JExcelApi for generating XLS files. From jxl.format.Colour , I see how to
Using Android TelephonyManager an application can obtain the state of data activity over the
While trying to read an xls file using jExcelAPI, I find that the library
Using C# .NET 3.5 and WCF, I'm trying to write out some of the
Using VS2008, C#, .Net 2 and Winforms how can I make a regular Button
Using linq2sql I'm trying to take the string in txtOilChange and update the oilChange
Using the navigator.geolocation object in JavaScript. Trying to establish accurate ranges, but wondering exactly

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.