Closed topsy-turvy closed 6 years ago
The file does not contain any text delimiters, but FastCSV is configured to read double quotes as a text delimiter, by default. The file does contain double quotes but they're not meant as text delimiters and thus FastCSV misinterprets them...
Right now, it's not possible to disable text delimiters explicitly, but you can set the character to some value that does not occur in your file(s).
I tested your file by setting the text delimiter to the null character by:
csvReader.setTextDelimiter('\0');
Much appreciate your reply. I'll give it a try. Thanks!
It works. Thank you.
Please help with this exception:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException at java.base/java.lang.System.arraycopy(Native Method) at de.siegmar.fastcsv.reader.ReusableStringBuilder.append(ReusableString Builder.java:65) at de.siegmar.fastcsv.reader.RowReader.readLine(RowReader.java:74) at de.siegmar.fastcsv.reader.CsvParser.nextRow(CsvParser.java:85) at de.siegmar.fastcsv.reader.CsvReader.read(CsvReader.java:147) at de.siegmar.fastcsv.reader.CsvReader.read(CsvReader.java:126) at com.teamtrade.fundamental.report.screener.ReportScreener.readCsvFile( ReportScreener.java:69) at com.teamtrade.fundamental.report.screener.ReportScreener.readQuarterR eports(ReportScreener.java:141) at com.teamtrade.fundamental.report.screener.ReportScreener.main(ReportS creener.java:45)
CSV file name 'txt.tsv'. It is in this archive: https://www.sec.gov/files/dera/data/financial-statement-and-notes-data-sets/2015q2_notes.zip