You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Rick Mann (JIRA)" <ji...@apache.org> on 2016/11/08 08:24:58 UTC
[jira] [Updated] (CSV-202) Can't parse Excel file
[ https://issues.apache.org/jira/browse/CSV-202?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rick Mann updated CSV-202:
--------------------------
Attachment: test.xls
> Can't parse Excel file
> ----------------------
>
> Key: CSV-202
> URL: https://issues.apache.org/jira/browse/CSV-202
> Project: Commons CSV
> Issue Type: Bug
> Components: Parser
> Affects Versions: 1.4
> Reporter: Rick Mann
> Attachments: test.xls
>
>
> I was excited to discover CSV could parse excel files, allowing me to skip a tedious step in processing files I receive. Sadly, it seems to be unable to parse the .xls file I'm given.
> I've included a simplified file with just the header row. When I try to parse it with {{CSVParser csv = CSVFormat.EXCEL.withHeader().parse(reader)}} and {{String customerID = rec.get("Customer ID")}} (inside a loop), I get this mess:
> {code}
> java.lang.IllegalArgumentException: Mapping for Customer ID not found, expected one of [��ࡱ�>�� #%����&������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ ������\p B�a=�@�"���`�����=-X>�78X1, �Helvetica Neue1� �Arial1@��Verdana1@��Verdanam/d/yyyy��� ��� �� ��� �� ��� �� ��� �� ��� �� ��� �� ��� �� ��� �� ��� �� ��� �� ��� �� ��� �� ��� �� ��� �� � � �+�� �� �)�� �� �, �� �� �*�� �� � �� �� � � �!|!��]
> at org.apache.commons.csv.CSVRecord.get(CSVRecord.java:104){code}
> File attached.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)