Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Encoding of CSVRenderOption
Migrateduser
<p>Hello community,</p>
<p> </p>
<p>I'm using the CSVRenderOption PlugIn to create CSV Reports. The content comes out fine, but when I open the file with MS Excel there are special letters like ä ö ü ß and so on missing. So, the encoding is not right. When I open the file with an normal text editor, the special letters are therem, no problems. Just with excel. What can I do?</p>
<pre class="_prettyXprint _lang-">
public File processingCSV() throws BirtAgentException
{
IRunAndRenderTask task = createTask();
String tempFile = System.getProperty("java.io.tmpdir") + "temp.csv";
CSVRenderOption csvOptions = new CSVRenderOption();
csvOptions.setOutputFormat(CSVRenderOption.OUTPUT_FORMAT_CSV);
csvOptions.setExportTableByName("table");
csvOptions.setOutputFileName(tempFile);
csvOptions.setDelimiter(";");
task.setRenderOption(csvOptions);
task.setEmitterID("org.eclipse.birt.report.engine.emitter.csv");
try
{
task.run();
}
catch (EngineException e)
{
e.printStackTrace();
}
task.close();
return new File(tempFile);
}
</pre>
<p>There I generate the file, an here I open it (the standard programm is excel):</p>
<pre class="_prettyXprint _lang-">
....
try
{
Desktop.getDesktop().open(new File(tempFile));
}
catch (Exception e)
{
.....
</pre>
<p>What can I do? Where can I set the encoding and which one should it be? </p>
<p> </p>
<p>Thanks!</p>
<p> </p>
Find more posts tagged with
Comments
There are no comments yet