Of note, Mac OS X 10.6 Snow Leopard now provides proper QuickLook support .csv files. It shows them as if they were opened in a spreadsheet. (Part of the same generator that shows Word, PowerPoint and Excel documents natively without Office itself installed)
Force Quick Look .csv files:
CSVQL.qlgenerator (Source Code)
While far from ideal I put together a QuickLook generator. It's been tested on both Intel and PPC computers running 10.5.6. There should be someway to just add .csv to be recognized as plain text somehow - as some generators already handle .csv but break when the file is not assigned to them.
It's possible to have an application tell LaunchServices to treat said file as a plain text file (UTTypeConformsTo definitions) but it needs to be defined in the Application's Info.plist - hence the issue you run into when the file is not assigned to open in any application, or the incorrect application
The other alternative is manually running quick look from the command line does work:
qlmanage -c public.plain-test PATH_TO_CSV_FILE
A quick primer for how QuickLook works for those curious:
When choosing to quick look a file the quick look daemon (
qlmanage -p from the command line) will look at the file and dependent on the application designed to open it look for a generator in one of 4 places. The application itself (
/Library/QuickLook, and lastly
The system defaults can be found at
Generators are identified by the UTI (Uniform Type Identifiers) of the file - the biggest issue is that comma separated values are not automatically defined as a known UTI in 10.5.
For the more fun details about creating QuickLook generators and how they work, check out developer.apple.com