N
N
netstalkerrr2015-03-20 12:53:37
Java
netstalkerrr, 2015-03-20 12:53:37

How to find out where the error is in the csv file?

I have a big csv file. 50 columns by 60,000 rows. Filled with values ​​about the product, warranty, etc. The problem is that when parsing it gives the error "java.io.IOException: (line 18476) invalid char between encapsulated token and delimiter". I so understood where that a problem with a separator. How to find out in which place, given that the file is very large?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2015-03-20
@netstalkerrr

Around 18476 lines plus minus a few lines, don't you find an error?
In parsing, you can add debug output to see on which line it had time to display what before stopping.

D
Dmitry, 2015-03-20
@EvilsInterrupt

Possible solutions:
1. If the program is not yours, then look for csv-linter
2. If the program is yours, then use log.debug(....)
3. If the program is not yours, then write the lint script yourself.
Pro is numbered in the order of actions taken.
This is my opinion, but I think there is a better solution!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question