adding autodetection of delimiter character for CSV files

Ben Manashirov benzakhar at gmail.com
Sun Jul 29 11:18:32 PDT 2012


I don't know if it has been done. But to me it doesn't seem like it. (I
haven't checked the latest version). Here is sample code in java
http://pastebin.com/NWN0hdw6

The basic idea is to take a sample amount of lines (e.g. 100).

- For each line
- - Count the number of times each character occurs
- Compute the "peakiness" for each characters occurrence over the lines.
- Find the character with smallest peakiness.

The idea is that the delimiter will occurs the same number of times on each
line, and hence its peakiness will be 0 ideally.

I'm just presenting this so perhaps someone will add this feature.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120729/ae33755f/attachment.html>


More information about the LibreOffice mailing list