odbc-wlx: plugin to view Access, Excel and DSN files

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Stefan2, white, Hacker

little-brother
Junior Member
Junior Member
Posts: 39
Joined: 2021-09-27, 10:27 UTC

Re: odbc-wlx: plugin to view Access, Excel and DSN files

Post by *little-brother »

but Excel and similar programs create csv and they use system delimiter, unless otherwise specified
The csv-format is used to exchange data between PC, that can use diffent OS/language/software. So I don't why plugin should attach to the current OS settings.
Comma is a "difficult" delimiter
But csv = comma-separated-values :) I know commas are used rarely and semicolon is more preferable.

I added a small changes and now the detector should work correctly - https://disk.yandex.ru/d/4dkMPv855LNCpQ
I don't make a new release version because I'm going to add some new features soon.
User avatar
chandragor
Member
Member
Posts: 103
Joined: 2005-06-01, 10:10 UTC
Location: Italy

Re: odbc-wlx: plugin to view Access, Excel and DSN files

Post by *chandragor »

Anyway, you are the author and yours is the choice.

I really appreciate your support and after all it is not such a problem to click on the status bar
and select the right separator whenever the heuristic fails.

My best regards and thanks for your plugin.

P.S. I can confirm that the alpha version you posted now works even with the sample I sent you as "NotWorking.csv".
Happy owner of license #12422 since 1997
User avatar
Usher
Power Member
Power Member
Posts: 1579
Joined: 2011-03-11, 10:11 UTC

Re: odbc-wlx: plugin to view Access, Excel and DSN files

Post by *Usher »

@chandragor
You should read the description of basic CSV standard as provided in October 2005: https://datatracker.ietf.org/doc/html/rfc4180
RFC4180 wrote: 5. Each field may or may not be enclosed in double quotes (however
some programs, such as Microsoft Excel, do not use double quotes
at all). If fields are not enclosed with double quotes, then
double quotes may not appear inside the fields.
(...)
6. Fields containing line breaks (CRLF), double quotes, and commas
should be enclosed in double-quotes.
(...)
7. If double-quotes are used to enclose fields, then a double-quote
appearing inside a field must be escaped by preceding it with
another double quote.
Notes:
1. Info about Excel behavior may be inaccurate, as the description was created in 2005 - before Microsoft introduced xlsx format in Excel 2007.
2.The problem with commas used as field separators and with other special characters exists for any regional settings. If you use CSV extension defined by Microsoft (with field separators and data formats taken from system regional settings), you should just replace word "commas" in the quoted CSV description with "field separators".
3. You can read also more info about problems with CSV in real use:
https://en.wikipedia.org/wiki/Comma-separated_values

@little-brother
As users may download CSV files from the Internet, you can't know what settings are used in such files and you can't be sure that autodetection works OK. I think that you should provide at least three options:
(*) System regional settings
( ) Autodetection
( ) User-defined settings: [;]
System regional settings should be the default value, I think.
Regards from Poland
Andrzej P. Wozniak
little-brother
Junior Member
Junior Member
Posts: 39
Joined: 2021-09-27, 10:27 UTC

Re: odbc-wlx: plugin to view Access, Excel and DSN files

Post by *little-brother »

you can't be sure that autodetection works OK
So users should send me an example of these files and I'll try to fix the detection.

I prefer to avoid an option redundancy. Lots of settings means lots of code.
User avatar
chandragor
Member
Member
Posts: 103
Joined: 2005-06-01, 10:10 UTC
Location: Italy

Re: odbc-wlx: plugin to view Access, Excel and DSN files

Post by *chandragor »

@Usher
Yes, I know that csv specification is a real mess :(

That's why I favoured the use of system regional settings.
And your proposal:
(*) System regional settings
( ) Autodetection
( ) User-defined settings: [;]
System regional settings should be the default value, I think.
is even better.

@little-brother
Anyway, as your plugin now works correctly with more than 95% of my csv files, I'm fine.
There's a quick solution for the rest: clicking on the status bar and selecting the appropriate
separator.

And if that doesn't work, there's something wrong with the csv :D
You can't imagine what garbage I was sent....

Regards.
Happy owner of license #12422 since 1997
little-brother
Junior Member
Junior Member
Posts: 39
Joined: 2021-09-27, 10:27 UTC

Re: odbc-wlx: plugin to view Access, Excel and DSN files

Post by *little-brother »

You can't imagine what garbage I was sent....
Plugin already supports some strange "CSV" files e.g.
* 00 (Zero-bytes = unexpected end-of-text) inside data
* Different number of columns in different rows
* Lines starting by # as comment

The plugin uses first 5 rows to detect the delimiter. If the file has a garbage in a header then the delimiter is selected randomly.
User avatar
blacky
Senior Member
Senior Member
Posts: 300
Joined: 2003-02-07, 16:58 UTC
Location: was das/whot's dath ?

Re: odbc-wlx: plugin to view Access, Excel and DSN files

Post by *blacky »

2little-brother

did you try "-" instead of "+" .. it's for me curious why it not works with "plus" because it's not a "ä", "\" or "ß"
and in the filesystems works also, in ext4 and Fat/ntfs :\ how ever .. :) you make a good job, thank you for this extensions :)
Image: https://www.blackysgate.de/files/folder-root/Total%20Commander/tc700pictures/Screenbumm.jpg
*g*.. Mess not meant in bad ;)


best regards
Blacky
Meine Blackysgate.de/net
Ma' Personal licence : already one. Hab auch eine
Mein Computer : Einer/once ??? bahh, Rz/Data Centre !
Kitchen, Liv.room, TV, Schlafz.. Sch...
BS/OS: Win3.1/7, Fedora a. other, Reactos
krasusczak
Senior Member
Senior Member
Posts: 271
Joined: 2011-09-23, 10:35 UTC

Re: odbc-wlx: plugin to view Access, Excel and DSN files

Post by *krasusczak »

Hello little-brother,

Thanks for this nice plugin :)
I wanted to report an issue with version 1.0.1 (1.0.0 & 0.9.9 works fine) on Windows 7 x64 + TC 10.52 x32
I been using your plugin with xls files (Excel 2003) & until now all works nice, but after recent update every file, even empty new test xls just crash.

Here is the stack:

---------------------------
Total Commander 10.52
---------------------------
Access violation at address 639C92D3. Write of address 00090C24.
Access violation at address 639C92D3. Write of address 00090C24
Windows 7 SP1 Ultimate 6.1 (Build 7601), base: 00400000

Please report this error to the Author, with a description
of what you were doing when this error occurred!

Windows exception: C0000005
Stack trace:
639C92D3
004747FE 0044E6A2 0044F03A 0042A97E 0044E52E 0042A97E
0044F03A 0044E6A2 0044F03A 0042A97E 0044E5D8 0042A97E
004023FB 004026C4 00427810 0044E5D8 0042A97E 0042C4D0
>0044D035 0044CF6B 0044EF2F 0044EF8B 0044CF6B 0044C65F
005030EC 0044E5D8 0042A97E 004023FB 004026C4 0044D035
0044E6A2 0044F03A 0042A97E 0044E5D8 0042A97E 004301B9
00430254
Raw:
0044E6A2 0044F05D 0048EBE6 0042A97E 0040779E 0048F26F
0048F285 0045004B 0042003F 00540013 00470039 0041871A
00418762 00420996 0042045D 0042045D 0047005A 0041B7E0
0041B81C 0041B8DD 00420996 00420996 0041CA9D 00402255
00402255 00403440 004021D4 00597FE2 00427271 00427424
0057705F 00412CB0 00402D9A 0041871A 00418762 0044E52E
0042A97E 004020AE 00402255 004026AC 00418647 004747FE
0044E6A2 0044F03A 0044F05D 0042A97E 0044E52E 0042A97E
0044F512 0044F3B3 0044D035 0044F309 0044F03A 0043DD1E
0044E62A 0044E6A2 0044F03A 0044F05D 0042A97E 0044E5D8
little-brother
Junior Member
Junior Member
Posts: 39
Joined: 2021-09-27, 10:27 UTC

Re: odbc-wlx: plugin to view Access, Excel and DSN files

Post by *little-brother »

krasusczak, yeah, x32 version is crashed.
Thanks for the bug report!
Post Reply