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: white, Hacker, petermad, Stefan2

little-brother
Junior Member
Junior Member
Posts: 43
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: 119
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: 1675
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.
Andrzej P. Wozniak
Polish subforum moderator
little-brother
Junior Member
Junior Member
Posts: 43
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: 119
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: 43
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: 311
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: 282
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: 43
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!
chicmatt
Junior Member
Junior Member
Posts: 5
Joined: 2013-09-04, 11:38 UTC
Location: Seoul, Korea

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

Post by *chicmatt »

I installed the plugin to view Excel (.xlsx) files.
In Quick View (Ctrl+Q), an error message occrued, saying "Can't connect to database".
In Lister (F3), the plugin shows the same error.
I am using Office 2021, 64bit version.

Image: https://imgur.com/a/xE2ttyv

Please help me me view Excel files.

Thank you very much.
little-brother
Junior Member
Junior Member
Posts: 43
Joined: 2021-09-27, 10:27 UTC

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

Post by *little-brother »

Try to rename a file as 1.xlsx. If the problem is gone, then the cause is a filename. Otherwise could you send me at lb-im@ya.ru any xlsx file that you can't view in the plugin? What version/bit of TC and Windows are you use?
P.S. The fastest way to get response is to create an issue on git-hub.
P.P.S. The plugin doesn't require installed Excel. It uses ODBC drivers that Windows often has out of the box.
User avatar
AntonyD
Power Member
Power Member
Posts: 1231
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

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

Post by *AntonyD »

ODBC drivers do exist only for 32 bit out-of-the-box.
For 64 We have to try very, very hard to find and install suitable drivers.
And hope that it doesn't break down with the next office update.
In general, it is not a very useful action to install a 64-bit Office.
#146217 personal license
little-brother
Junior Member
Junior Member
Posts: 43
Joined: 2021-09-27, 10:27 UTC

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

Post by *little-brother »

For 64 We have to try very, very hard to find and install suitable drivers.
https://www.microsoft.com/en-us/download/details.aspx?id=54920
?
User avatar
AntonyD
Power Member
Power Member
Posts: 1231
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

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

Post by *AntonyD »

yes, But considering that this is really the last available release as early as 2020 for office 16 - with 21 office, it does not always setup correctly.
#146217 personal license
little-brother
Junior Member
Junior Member
Posts: 43
Joined: 2021-09-27, 10:27 UTC

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

Post by *little-brother »

I suppose that if you install Office then you also install the same bits ODBC-drivers.
Microsoft Access Database Engine is required only for users without/or 32-bit Office.
Post Reply