Sat Oct 23, 2021 11:35 am
Login Register Lost Password? Contact Us


Excel Number format Issue while downloading result in EC

Topics specific to the use of the ECL IDE

Thu Oct 30, 2014 9:39 am Change Time Zone

Hi ,
I am encountering an issue with number format in excel for the results downloaded from ECL watch. PFB, the example.
//Start of code
layout := RECORD
STRING text;
END;

output := DATASET(['.15'],layout);
output;
//End of code
While downlaoding the result from ECL as excel the value .15 is being stored as 0.15. Is there is workaroud to avoid it?

Please help me out regarding the same.
pius_francis
 
Posts: 49
Joined: Mon Feb 03, 2014 10:30 am

Thu Oct 30, 2014 9:56 am Change Time Zone

How interesting...

I just opened the raw xls file in a text editor and it looks like it is Excel that is adding the "0":

Code: Select all
<html xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <head>
    <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Result </title>
  </head>
  <body class="yui-skin-sam">
    <table xmlns:msxsl="urn:schemas-microsoft-com:xslt" class="results" cellspacing="0" frame="box" rules="all">
      <thead>
        <tr valign="bottom">
          <th rowspan="1">text</th>
        </tr>
      </thead>
      <tr>
        <td>.15</td>
      </tr>
    </table>
  </body>
</html>
gsmith
 
Posts: 290
Joined: Thu May 12, 2011 9:40 am

Thu Oct 30, 2014 10:07 am Change Time Zone

Thanks for the reply.

Yeah Smith , in xml we will get .15 only. Is this an issue with ECL download or can we have any work around like specifying the number format for excel while downloading ?
pius_francis
 
Posts: 49
Joined: Mon Feb 03, 2014 10:30 am

Thu Oct 30, 2014 10:33 am Change Time Zone

In the IDE you can save a result as CSV - then in Excel, click on the DATA tab and import the CSV, during that process you can specify the data type for each column...
gsmith
 
Posts: 290
Joined: Thu May 12, 2011 9:40 am

Thu Oct 30, 2014 10:44 am Change Time Zone

Smith , i have tried that part. The scenario i have shared is a sample one. But we have different number format for same column for the real Use Case.Only if we are able to avoid the formatting change when it goes into excel or csv it will be useful.

Thanks
Pius
pius_francis
 
Posts: 49
Joined: Mon Feb 03, 2014 10:30 am


Return to ECL IDE

Who is online

Users browsing this forum: No registered users and 1 guest

cron