How to Export the chinese character in excel using java

Hi,
Our application using in English, German, Franch and chinese.
String chineseCharacter=""; // chineseCharacter like 長长牀床東东彿佛. This chinese data coming from oracle database..
My code
BufferedWriter printer = new BufferedWriter(new OutputStreamWriter(responses.getOutputStream(),"utf-8"));
responses.setContentType("application/download");
responses.setHeader("Cache-Control", "cache");
responses.setHeader("pragma", "cache");
ExcelCSVPrinter outcr = new ExcelCSVPrinter(printer);
String displayname="ChineseReport.csv";
responses.setHeader("Content-Disposition","inline; filename=\"" + displayname + "\"");
outcr.write("Report Header Name");
outcr.writeln();
outcr.write(chineseCharacter);
outcr.writeln();
After export the data to excel show the result for 長长牀床東东彿佛. But not show the original result 長长牀床東东彿佛
I use the following stmt
responses.setContentType("text/html charset=UTF-8");
Its shows the correct result for chinese character.
I use the below statement
responses.setContentType("application/download; charset=UTF-8");
or
responses.setContentType("application/vnd.ms-excelset;charset=UTF-8");      
or     
responses.setContentType("application/vnd.ms-excel;charset=UTF-8");
The out put show the in the excel sheet ???????? or some other jung characters.
What can i do here?. After export,I want to show the original chinese character in the excel sheet using the ExcelCSVPrinter.
Thanks & Regards
Thendral
Edited by: palanithendral on Dec 24, 2009 5:14 AM
Edited by: palanithendral on Dec 29, 2009 11:41 AM

palanithendral wrote:
Hi,
Our application using in English, German, Franch and chinese.You have several different idioms in your application and have not accurately identified where the actual problem is. You have all of the following
-database
-http
-excel
-excel in http
-display on the target computer
The first step with these sorts of problem is to identify where the problem actually occurs.
String chineseCharacter=""; // chineseCharacter like 長长牀床東东彿佛. This chinese data coming from oracle database..A good theory. Now explain how you proved that that is what is coming from the database.
After export the data to excel show the result for 長长牀床東东彿佛.As another example. Presumably you are referring to what the browser on the target computer displays. Your theory is that that computer and that browser (together) will display the correct information if they had the correct data. How did you prove that?

Similar Messages

  • How to store the data read from excel using java code in Ms access database

    Hi. I wrote a code to read the data from excel. May i know how can i save it to Ms access database using java. Also i have many excels. So i should not connect the database using DSN. So is there any other way to achieve this?

    kramish wrote:
    Im pretty sure that Access does support JDBCNo it does not. It supports ODBC.
    just doing a quick Google came up with some pages:
    http://blog.taragana.com/index.php/archive/access-microsoft-access-database-from-java-using-jdbc-odbc-bridge-sample-code/
    http://www.javaworld.com/javaworld/javaqa/2000-09/03-qa-0922-access.html
    Both articles explains how to use the jdbc-odbc bridge. I think I've seen a pure jdbc driver for access but it wasn't from Microsoft and it wasn't free.
    Kaj

  • How to download the chinese character using GUI_DOWNLOAD

    How to download the chinese character using GUI_DOWNLOAD from SAP 4.6c

    Hi,
       Make sure that the chinese font is installed in your system, because when you download in excel, the character formats are taken from the Frontend.  For detail see the below thread.
    [link1|Re: Download Chinese character]
    Thanks,
    Asit Purbey.

  • How to export the dashboard reports for Excel in OBIEE 11.1.1.6.0?

    Hi Experts,
    How to export the dashboard reports for Excel in OBIEE 11.1.1.6.0?
    For example:
    Dashboard contains more than one report, and add one export button for downloading these reports for Excel.
    Is it possible to implement this requirement?Thanks.

    There is no direct option, you can try the following workaround.
    Page Option -> Print -> Printable Html
    Then File -> Save Page as
    Choos Save as type as -> All files
    File name as Report.xls
    When you Open the xls file, if you get a pop up saying problem during load just omit it and proceed.
    The report will open in excel.
    Or save the page as html /mht and open it with Excel, this also will work.
    Note: I have tested this in Mozilla
    Thanks,
    Vino

  • How to export the data to a excel file from RSA3?

    Hi experts,
    1.I am trying to save the RSA (SRM extractor) to excel spread sheet to compare SRM data with BI data. When i run the the transaction RSA3 it just showed me 10 different data packets. How to export the data to excel spread sheet for reconciliation?
    2. Does any body know if the stepup tables exist for SRM extractors?
    Thank in advance
    Sharat.

    Hello Sharat,
    You have two options of saving data to excel sheet:
    Step 1: 
    Goto RSA3, change the "Data Records / Calls" to 1000 and then execute. This way instead of 10 different packets you will get one packet.
    Step2:
    Click on the list button, open the packet by double clicking it. You will see all the data on your screen.
    Step3:
    Goto System -> List -> Save - > Local File -> Spreadsheet and give some name for your xls file.
    Assign points if helpful.
    Regards,
    F-S

  • How can show the Chinese character in Oracle Report Graph on RedHat Linux?

    The OS is RedHat Linux and I set NLS="SIMPLIED CHINESE_CHINA.ZHS16GBK" in %ORA_AS_HOME%/bin/reports.sh
    The report file is a JSP Web Report, including Chinese character in web HTML text and graph.
    Now Chinese character in HTML text can be displayed correctly but the Chinese character in graph can not be display.
    Anybody can help me? thanks a lot.

    The report server is 9i and it is running in Oracle AS 904.
    And set NLS_LANG="SIMPLIED CHINESE_CHINA.ZHS16GBK" in %ORA_AS_HOME%/bin/reports.sh

  • How to export the data to a  Excel file

    Hi all,
    How to use the  'EXCEL_OLE_STANDARD_DAT'
    to export the data from itab to EXCEL file.
    REPORT  ZT11.
    data : begin of itab occurs 0,
          t1(3)  type c  value 'sag',
          t2(3)  type c value 'ntc',
          end of itab.
          append itab.
          write : itab-t1,itab-t2.
          CALL FUNCTION 'GET_FIELDTAB'
          EXPORTING
            LANGU                     = SY-LANGU
            ONLY                      = ' '
            TABNAME                   = ' '
            WITHTEXT                  = 'X'
          IMPORTING
            HEADER                    =
            RC                        =
            TABLES
              FIELDTAB                  =
          EXCEPTIONS
            INTERNAL_ERROR            = 1
            NO_TEXTS_FOUND            = 2
            TABLE_HAS_NO_FIELDS       = 3
            TABLE_NOT_ACTIV           = 4
            OTHERS                    = 5
          IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          CALL FUNCTION 'EXCEL_OLE_STANDARD_DAT'
            EXPORTING
              FILE_NAME                       =
            CREATE_PIVOT                    = 0
            DATA_SHEET_NAME                 = ' '
            PIVOT_SHEET_NAME                = ' '
            PASSWORD                        = ' '
            PASSWORD_OPTION                 = 0
          TABLES
            PIVOT_FIELD_TAB                 =
            DATA_TAB                        =
            FIELDNAMES                      =
          EXCEPTIONS
            FILE_NOT_EXIST                  = 1
            FILENAME_EXPECTED               = 2
            COMMUNICATION_ERROR             = 3
            OLE_OBJECT_METHOD_ERROR         = 4
            OLE_OBJECT_PROPERTY_ERROR       = 5
            INVALID_PIVOT_FIELDS            = 6
            DOWNLOAD_PROBLEM                = 7
            OTHERS                          = 8
          IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.

    Hi, you can even use control technology. There are several example programs how to export data to excel. Please go to transaction SE80. Choose enviroment->examples -> control examples.  Take a look at office integration.
    /Ernesto

  • How to export the created Pivot table by using Power Pivot into separate excel file in the same format?

    Hi PowerPivot experts,
    I have created more than 60 pivot tables in multiple sheets by using PowerPivot work book. now i want delivery all the pivot table in excel document to my end user by email.
    I want send only the Pivot tables which i created using PowerPivot data model instead of sending the whole model file since its very heavy.
    I have tried with export option in Excel 97-2003, its works fine but not getting exact pivot format which i created and its displays as value.
    My aim to send pivot table that i created format but not whole file with source data.
    I would be really grateful if advise me to fix it out.

    Hi Robert,
    I don't think it is a good idea to deliver all PivotTable report to end user via E-mail, and SQL Server PowerPivot for Excel doesn't support to deliver PivotTable report to end user without PowerPivot data inside in the data model. For example, I suppose
    we create a PivotTable to display the SalesAmount of US in pervious years(eg:2012, 2013, 2014), how can we dynamic show the value based on end user selection without PowerPivot data model data(The PivotTable report don't have data source)?
    So, one workaround that we can create a shared folder to store all of PowerPivot report for all of end user in the domain environment, and then inform end users to copy the PowerPivot reports what they want via E-mail.
    If the end users aren't in domain environment, we can implement the VPN soltion to achieve this.
    Regards,
    Elvis Long
    TechNet Community Support

  • How to export the sql output to Excel?

    I installed Raptor on my system. I ran few reports and trying to figure out how to save the reprots to excel srpeasheet format. I just see 'save' but not sure where the output is saved and with what filename. Saveas is grayed out all the time.

    Unfortunately, there are some things that Excel gets confused going through CSV files (or copy and pate). For example, our task number structure within Oracle Projects is to name each task with the super-task number "-" sub task number (10, 10-1, 10-2, 10-3, etc). As soon as you are not directly creating the Excel file, Excel will interpret the "10-1", "10-2", etc as dates - 10-Jan, 10-Feb for our date format and presumably 1-Oct, 2-Oct for US date format.
    I have just tested exporting the data to CSV and then opening in Excel and also selecting all data, copying and pasting into Excel and both convert "10-1" to 10-Jan (assumes current year).
    You get similar issues with text columns that contain only numeric values (for example our employee numbers are stored in a text field, but are numeric and left passed with zeros to ensure consistent length), or a mixture of numeric values and alpha-numeric values.

  • How to set the size of an Excel-file,Java created in tabbed forma

    Hi all,
    I'm creating an Excel-file by writing data to an outputStream in tabbed format.
    My problem is : How can I set the width of the columns of that Excel-file, not the default-size?
    If anyone can help, that would be very nice.
    Thanks a lot,
    Regards,
    Tim

    You can write a generic xls file containing a Macro to open and set the column widths of text or csv files. Your java program can then call this generic file to open your text files.

  • How to export data from report to excel using report 10g

    Hi,
    usnig report 10g, can we export the data from report to excel.
    Regards
    Randhir

    Hi,
    have a look at metalink note 209770.1: Getting Reports Ouput to MS Excel - Techniques and References
    Regards
    Rainer

  • How to fix the row-height in excel using ole2

    hi
    I want to fix row height in excel using ole2.
    i wrote the below code but no effect. please help me.
    Arg := ole2.create_arglist;
         ole2.add_arg(Arg,1);
         rrow := ole2.get_obj_property(WorkSheet,'Rows',Arg);
         ole2.destroy_arglist(arg);
         ole2.set_property(rrow,'Height',50);
    kanish

    It's solved
         ole2.set_property(rrow,'RowHeight',30);
    kanish

  • Need help in how to print new line character in unix using java

    Hi All,
    I use the printstream class to print some line in a text using java.
    here is the code:
       FileOutputStream out; // declare a file output object
            PrintStream p; // declare a print stream object
                    p.print("\t");
                    p.print(date);
                    p.print("\t\t");
                    p.print(RecCount);
                    p.println("\n");when i use this and output of this character in windows is
    date RecCount
    22-07-2007 23456
    when i use the same code in unix it shows the following output:
    date RecCount[]22-07-2007
    it wont accept the new line character could any one give me an idea to solve this problem.

    PrintStream has a println() method. Use that. Or System.getProperty("line.separator").
    Because a newline char doesn't necessarily specify a line break. It's system-dependent.

  • How to read the hard disk serial number using java this is urgent

    Please do let me know any knows how to read the hard disk unique number provided by manufactruer using java library

    I don't know; I think the fate of the free worldrests upon the answer.
    Well, as long as the non-free world stays unharmed,
    it can't be so bad ...I think the "Axis of Evil" constitutes a group of countries that are just "misunderstood".

  • How to change the properties of a directory using java code

    Hai All,
    I need to change the properties of directory( websharing).
    Can i do this using java code.
    Regards,
    Charan

    I need to change the properties of
    directory( websharing).
    an i do this using java code.Depends on whether the server has a Java API to do it. Most likely it hasn't.

Maybe you are looking for

  • Wiped macbook pro will not boot from install DVD

    I recently purchased an older MacBook Pro that came with the OS system wiped but it did have the original Install DVDs.  The computer will not boot from the DVD.  I have booted holding down the C key and nothing happens.  I have booted holding down t

  • How to create Vendors for local scenario

    Hi, Please let me know how to create vendors for locla scenarion in EBP. Thanks, Manu

  • HT4623 Can't find Siri on my iOS

    Somehow I no longer have Siri on my iPad, help!

  • Cheque print out to vendor

    hi friendss coulds anybody please explain , how the cheque is being taken print out , so that it could be given to the corresponding vendor after miro. i kno up to miro , please tell me what the next process with tcode. if any confiruation there  to

  • Can't access source files for onDemand Seminar

    HI I "attended" the On Demand Seminar given by Lynn Grillo - entitled Dreaweaver for traditional graphic designers 10_23 and there was a PDF to dl - called Getting_Your_Design_to_the_Browser.pdf and with that, you are supposed to be able remove the f