commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ram (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (SANDBOX-210) Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly but not writing them back the same way
Date Tue, 26 Aug 2008 02:51:44 GMT

    [ https://issues.apache.org/jira/browse/SANDBOX-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625607#action_12625607
] 

pcsri1956 edited comment on SANDBOX-210 at 8/25/08 7:51 PM:
------------------------------------------------------

This issue happens in CSVPrinter class. Here is how I fixed it. Look in the comment below
where change is suggested specifically EXCEL_STRATEGY

private String escapeAndQuote(String value) {
.........    
          if (c == strategy.getEncapsulator()) {

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
                             sb.append('"').append(c);                    

                      // changed from  sb.append('\\').append(c);  
 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////

        continue;
................
      }
      }

      was (Author: pcsri1956):
    This issue happens in CSVPrinter class. Here is how I fixed it. Look in the comment below
where change is suggested specifically EXCEL_STRATEGY

private String escapeAndQuote(String value) {
.........    
          if (c == strategy.getEncapsulator()) {

                             sb.append('"').append(c);                      // changed from
 sb.append('\\').append(c);  
        
        continue;
................
      }
      }
  
> Commons CSV EXCELL_STRATEGY is reading CSV files with double quote and comma properly
but not writing them back the same way
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SANDBOX-210
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-210
>             Project: Commons Sandbox
>          Issue Type: Bug
>          Components: CSV
>            Reporter: Ilya Egoshin
>
> original line: My line is containing ", symbols
> line in CSV file after "Save as CSV" in Excell: "My line containing "", symbols"
> line is CSV file as output from CSVPrinter with EXCELL_STRATEGY: "My line containing
\", symbols"
> as a result when you will try to open that file in the excell you see text inside two
cells:
> 1 cell: My line containing \
> 2 cell: symbols
> is it again Microsoft "features", that are "improving" RFC?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message