SQL2XLS
11 years agoescape data which looks like formula master
Dobrica Pavlinusic [Thu, 27 Dec 2012 12:57:01 +0000 (12:57 +0000)]
escape data which looks like formula

git-svn-id: svn://svn.rot13.org/SQL2XLS@28 2e857b76-582b-47e5-ad5c-b3ba0f0ee29b

13 years agoinitial port to Excel::Writer::XLSX
Dobrica Pavlinusic [Tue, 28 Dec 2010 13:56:16 +0000 (13:56 +0000)]
initial port to Excel::Writer::XLSX

Which doesn't seem to work as-is yet!

git-svn-id: svn://svn.rot13.org/SQL2XLS@27 2e857b76-582b-47e5-ad5c-b3ba0f0ee29b

13 years agobegin porting to Excel::Writer::XLSX
Dobrica Pavlinusic [Tue, 28 Dec 2010 13:35:57 +0000 (13:35 +0000)]
begin porting to Excel::Writer::XLSX

git-svn-id: svn://svn.rot13.org/SQL2XLS@26 2e857b76-582b-47e5-ad5c-b3ba0f0ee29b

15 years agore-introduce $sth->rows > 0 check which PostgreSQL needs
Dobrica Pavlinusic [Thu, 12 Feb 2009 10:56:03 +0000 (10:56 +0000)]
re-introduce $sth->rows > 0 check which PostgreSQL needs
to detect queries which doesn't return results
(like create temporary table)

git-svn-id: svn://svn.rot13.org/SQL2XLS@25 2e857b76-582b-47e5-ad5c-b3ba0f0ee29b

15 years agomore output when running without debug
Dobrica Pavlinusic [Thu, 6 Nov 2008 10:53:59 +0000 (10:53 +0000)]
more output when running without debug

git-svn-id: svn://svn.rot13.org/SQL2XLS@24 2e857b76-582b-47e5-ad5c-b3ba0f0ee29b

15 years agosupport $db_encoding for Pg and mysql DBI drivers
Dobrica Pavlinusic [Thu, 6 Nov 2008 10:49:02 +0000 (10:49 +0000)]
support $db_encoding for Pg and mysql DBI drivers

git-svn-id: svn://svn.rot13.org/SQL2XLS@23 2e857b76-582b-47e5-ad5c-b3ba0f0ee29b

15 years agouse "set names '$db_encoding'" to for MySQL to get
Dobrica Pavlinusic [Thu, 6 Nov 2008 10:37:17 +0000 (10:37 +0000)]
use "set names '$db_encoding'" to for MySQL to get
correct character encoding in generated Excel

git-svn-id: svn://svn.rot13.org/SQL2XLS@22 2e857b76-582b-47e5-ad5c-b3ba0f0ee29b

15 years agosupport multiple SQL queries in one file, for example
Dobrica Pavlinusic [Mon, 3 Nov 2008 23:19:40 +0000 (23:19 +0000)]
support multiple SQL queries in one file, for example
to use create temporary time to speedup reporting

git-svn-id: svn://svn.rot13.org/SQL2XLS@21 2e857b76-582b-47e5-ad5c-b3ba0f0ee29b

15 years agostrip \d+[-_] from beginning of SQL file before creating sheet name
Dobrica Pavlinusic [Mon, 3 Nov 2008 22:31:47 +0000 (22:31 +0000)]
strip \d+[-_] from beginning of SQL file before creating sheet name

git-svn-id: svn://svn.rot13.org/SQL2XLS@20 2e857b76-582b-47e5-ad5c-b3ba0f0ee29b

15 years agouse heuristics to guess date time fields if we don't
Dobrica Pavlinusic [Mon, 3 Nov 2008 22:29:05 +0000 (22:29 +0000)]
use heuristics to guess date time fields if we don't
have correct type from database (as from MySQL, sigh!)

git-svn-id: svn://svn.rot13.org/SQL2XLS@19 2e857b76-582b-47e5-ad5c-b3ba0f0ee29b

15 years agosplit require_config into own sub, so we now read global
Dobrica Pavlinusic [Mon, 3 Nov 2008 22:26:57 +0000 (22:26 +0000)]
split require_config into own sub, so we now read global
and local config (within directory)

git-svn-id: svn://svn.rot13.org/SQL2XLS@18 2e857b76-582b-47e5-ad5c-b3ba0f0ee29b

15 years agoremove dependency on CGI
Dobrica Pavlinusic [Mon, 3 Nov 2008 22:24:11 +0000 (22:24 +0000)]
remove dependency on CGI

git-svn-id: svn://svn.rot13.org/SQL2XLS@17 2e857b76-582b-47e5-ad5c-b3ba0f0ee29b

15 years agoundef $db_encoding to disable decode of encoding
Dobrica Pavlinusic [Mon, 3 Nov 2008 21:53:30 +0000 (21:53 +0000)]
undef $db_encoding to disable decode of encoding

git-svn-id: svn://svn.rot13.org/SQL2XLS@16 2e857b76-582b-47e5-ad5c-b3ba0f0ee29b

15 years agountaint config_path
Dobrica Pavlinusic [Mon, 3 Nov 2008 21:39:44 +0000 (21:39 +0000)]
untaint config_path

git-svn-id: svn://svn.rot13.org/SQL2XLS@15 2e857b76-582b-47e5-ad5c-b3ba0f0ee29b

15 years agoadded configuration example and improved pod a bit
Dobrica Pavlinusic [Mon, 3 Nov 2008 20:42:55 +0000 (20:42 +0000)]
added configuration example and improved pod a bit

git-svn-id: svn://svn.rot13.org/SQL2XLS@14 2e857b76-582b-47e5-ad5c-b3ba0f0ee29b

15 years agoimplement sub-reports which are simply directories and SQL queries,
Dobrica Pavlinusic [Mon, 3 Nov 2008 20:32:44 +0000 (20:32 +0000)]
implement sub-reports which are simply directories and SQL queries,
each generating single XLS file

git-svn-id: svn://svn.rot13.org/SQL2XLS@13 2e857b76-582b-47e5-ad5c-b3ba0f0ee29b

15 years agosuggest ScriptAlias to get nice URLs
Dobrica Pavlinusic [Mon, 3 Nov 2008 20:15:09 +0000 (20:15 +0000)]
suggest ScriptAlias to get nice URLs

git-svn-id: svn://svn.rot13.org/SQL2XLS@12 2e857b76-582b-47e5-ad5c-b3ba0f0ee29b

15 years agoimplement 31 char limit for sheet name with warning
Dobrica Pavlinusic [Mon, 3 Nov 2008 19:30:12 +0000 (19:30 +0000)]
implement 31 char limit for sheet name with warning

git-svn-id: svn://svn.rot13.org/SQL2XLS@11 2e857b76-582b-47e5-ad5c-b3ba0f0ee29b

15 years agoread config.pl file if it exists
Dobrica Pavlinusic [Mon, 3 Nov 2008 19:19:39 +0000 (19:19 +0000)]
read config.pl file if it exists

git-svn-id: svn://svn.rot13.org/SQL2XLS@10 2e857b76-582b-47e5-ad5c-b3ba0f0ee29b

15 years agoadded Makefile.PL to check dependencies
Dobrica Pavlinusic [Mon, 3 Nov 2008 18:55:36 +0000 (18:55 +0000)]
added Makefile.PL to check dependencies
since we don't require building of anything

git-svn-id: svn://svn.rot13.org/SQL2XLS@9 2e857b76-582b-47e5-ad5c-b3ba0f0ee29b

15 years agostrip spaces around comments
Dobrica Pavlinusic [Mon, 3 Nov 2008 18:51:49 +0000 (18:51 +0000)]
strip spaces around comments

git-svn-id: svn://svn.rot13.org/SQL2XLS@8 2e857b76-582b-47e5-ad5c-b3ba0f0ee29b

15 years agofix warning
Dobrica Pavlinusic [Mon, 3 Nov 2008 18:50:02 +0000 (18:50 +0000)]
fix warning

git-svn-id: svn://svn.rot13.org/SQL2XLS@7 2e857b76-582b-47e5-ad5c-b3ba0f0ee29b

15 years agodisconnect from database before next connect, support unknown types
Dobrica Pavlinusic [Mon, 3 Nov 2008 18:44:42 +0000 (18:44 +0000)]
disconnect from database before next connect, support unknown types

git-svn-id: svn://svn.rot13.org/SQL2XLS@6 2e857b76-582b-47e5-ad5c-b3ba0f0ee29b

15 years agocleanup mode in preparation for first release
Dobrica Pavlinusic [Mon, 3 Nov 2008 18:31:58 +0000 (18:31 +0000)]
cleanup mode in preparation for first release

- move pod documentation to top
- check GATEWAY_INTERFACE to detect cgi, so it works as
  simple command-line xls dumper again
- disabled AutoCommit so we can't corrupt data by invoking reports

git-svn-id: svn://svn.rot13.org/SQL2XLS@5 2e857b76-582b-47e5-ad5c-b3ba0f0ee29b

16 years ago- support for \c database just like psql does
Dobrica Pavlinusic [Mon, 24 Mar 2008 23:02:15 +0000 (23:02 +0000)]
- support for \c database just like psql does
  (you can pipe sql into psql and it will work!)
- better support for multi-line SQL queries

git-svn-id: svn://svn.rot13.org/SQL2XLS@4 2e857b76-582b-47e5-ad5c-b3ba0f0ee29b

16 years agoconvert SQL date into excel dates (with format dd.mm.yyyy)
Dobrica Pavlinusic [Mon, 24 Mar 2008 16:35:29 +0000 (16:35 +0000)]
convert SQL date into excel dates (with format dd.mm.yyyy)

git-svn-id: svn://svn.rot13.org/SQL2XLS@3 2e857b76-582b-47e5-ad5c-b3ba0f0ee29b

16 years agofix encoding of characters in generated sheet
Dobrica Pavlinusic [Mon, 24 Mar 2008 15:57:14 +0000 (15:57 +0000)]
fix encoding of characters in generated sheet

git-svn-id: svn://svn.rot13.org/SQL2XLS@2 2e857b76-582b-47e5-ad5c-b3ba0f0ee29b

16 years agobegin work on web reports which return SQL queries
Dobrica Pavlinusic [Mon, 24 Mar 2008 14:05:54 +0000 (14:05 +0000)]
begin work on web reports which return SQL queries
as XLS table (readable in Gnumeric also :-)

git-svn-id: svn://svn.rot13.org/SQL2XLS@1 2e857b76-582b-47e5-ad5c-b3ba0f0ee29b