문제

I am little new to Super CSV. Just wanted to check if there is provision to delete or modify a line in a CSV file?

Looking at the source, I do not see use of RandomAccessFile in rw mode. Any way to customize this?

도움이 되었습니까?

해결책

Super CSV doesn't support editing CSV files.

The quick and dirty solution would be to create a copy of the CSV file (i.e. read in each line with Super CSV, then write it out to a different file). You can choose whether to modify the data or to omit a line very easily.

As you've probably seen, Super CSV works with Readers/Writers. It might be possible to write your own Reader/Writer that wraps RandomAccessFile which could then be used by Super CSV, but it might just be simpler to make a copy.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top