{
    "content": [
        {
            "type": "text",
            "text": "# DBD::Excel (perldoc)\n\n## NAME\n\nDBD::Excel - A class for DBI drivers that act on Excel File.  This is still alpha version.\n\n## SYNOPSIS\n\nuse DBI;\n$hDb = DBI->connect(\"DBI:Excel:file=test.xls\")\nor die \"Cannot connect: \" . $DBI::errstr;\n$hSt = $hDb->prepare(\"CREATE TABLE a (id INTEGER, name CHAR(10))\")\nor die \"Cannot prepare: \" . $hDb->errstr();\n$hSt->execute() or die \"Cannot execute: \" . $hSt->errstr();\n$hSt->finish();\n$hDb->disconnect();\n\n## DESCRIPTION\n\nThis is still alpha version.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (2 subsections)\n- **TODO**\n- **KNOWN BUGS**\n- **AUTHOR**\n- **SEE ALSO**\n- **COPYRIGHT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "DBD::Excel",
        "section": "",
        "mode": "perldoc",
        "summary": "DBD::Excel - A class for DBI drivers that act on Excel File.  This is still alpha version.",
        "synopsis": "use DBI;\n$hDb = DBI->connect(\"DBI:Excel:file=test.xls\")\nor die \"Cannot connect: \" . $DBI::errstr;\n$hSt = $hDb->prepare(\"CREATE TABLE a (id INTEGER, name CHAR(10))\")\nor die \"Cannot prepare: \" . $hDb->errstr();\n$hSt->execute() or die \"Cannot execute: \" . $hSt->errstr();\n$hSt->finish();\n$hDb->disconnect();",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 31,
                "subsections": [
                    {
                        "name": "Metadata",
                        "lines": 61
                    },
                    {
                        "name": "Driver private methods",
                        "lines": 16
                    }
                ]
            },
            {
                "name": "TODO",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "KNOWN BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "DBD::Excel - A class for DBI drivers that act on Excel File.\n\nThis is still alpha version.\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use DBI;\n$hDb = DBI->connect(\"DBI:Excel:file=test.xls\")\nor die \"Cannot connect: \" . $DBI::errstr;\n$hSt = $hDb->prepare(\"CREATE TABLE a (id INTEGER, name CHAR(10))\")\nor die \"Cannot prepare: \" . $hDb->errstr();\n$hSt->execute() or die \"Cannot execute: \" . $hSt->errstr();\n$hSt->finish();\n$hDb->disconnect();\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This is still alpha version.\n\nThe DBD::Excel module is a DBI driver. The module is based on these modules:\n\n*   Spreadsheet::ParseExcel\n\nreads Excel files.\n\n*   Spreadsheet::WriteExcel\n\nwrites Excel files.\n\n*   SQL::Statement\n\na simple SQL engine.\n\n*   DBI\n\nOf course. :-)\n\nThis module assumes TABLE = Worksheet. The contents of first row of each worksheet as column\nname.\n\nAdding that, this module accept temporary table definition at \"connect\" method with \"xlvtbl\".\n\nex. my $hDb = DBI->connect( \"DBI:Excel:file=dbdtest.xls\", undef, undef, {xlvtbl => {TESTV => {\nsheetName => 'TESTV', ttlRow => 5, startCol => 1, colCnt => 4, datRow => 6, datLmt => 4, } }\n});\n\nFor more information please refer sample/tex.pl included in this distribution.\n",
                "subsections": [
                    {
                        "name": "Metadata",
                        "content": "The following attributes are handled by DBI itself and not by DBD::Excel, thus they all work\nlike expected:\n\nActive\nActiveKids\nCachedKids\nCompatMode             (Not used)\nInactiveDestroy\nKids\nPrintError\nRaiseError\nWarn                   (Not used)\n\nThe following DBI attributes are handled by DBD::Excel:\n\nAutoCommit\nAlways on\n\nChopBlanks\nWorks\n\nNUMOFFIELDS\nValid after \"$hSt->execute\"\n\nNUMOFPARAMS\nValid after \"$hSt->prepare\"\n\nNAME\nValid after \"$hSt->execute\"; undef for Non-Select statements.\n\nNULLABLE\nNot really working, always returns an array ref of one's. Valid after \"$hSt->execute\"; undef\nfor Non-Select statements.\n\nThese attributes and methods are not supported:\n\nbindparaminout\nCursorName\nLongReadLen\nLongTruncOk\n\nAdditional to the DBI attributes, you can use the following dbh attribute:\n\nxlfmt\nThis attribute is used for setting the formatter class for parsing.\n\nxldir\nThis attribute is used only with \"datasources\" on setting the directory where Excel files\n('*.xls') are searched. It defaults to the current directory (\".\").\n\nxlvtbl\nassumes specified area as a table. *See sample/tex.pl*.\n\nxlskiphidden\nskip hidden rows(=row height is 0) and hidden columns(=column width is 0). *See\nsample/thidden.pl*.\n\nxlignorecase\nset casesensitive or not about table name and columns. Default is sensitive (maybe as\nSQL::Statement). *See sample/thidden.pl*.\n"
                    },
                    {
                        "name": "Driver private methods",
                        "content": "datasources\nThe \"datasources\" method returns a list of '*.xls' files of the current directory in the\nform \"DBI:Excel:xldir=$dirname\".\n\nIf you want to read the subdirectories of another directory, use\n\nmy($hDr) = DBI->installdriver(\"Excel\");\nmy(@list) = $hDr->datasources(\n{ xldir => '/usr/local/xldata' } );\n\nlisttables\nThis method returns a list of sheet names contained in the $hDb->{file}. Example:\n\nmy $hDb = DBI->connect(\"DBI:Excel:file=test.xls\");\nmy @list = $hDb->func('listtables');\n"
                    }
                ]
            },
            "TODO": {
                "content": "More tests\nFirst of all...\n\nType and Format\nThe current version not support date/time and text formatting.\n\nJoins\nThe current version of the module works with single table SELECT's only, although the basic\ndesign of the SQL::Statement module allows joins and the likes.\n",
                "subsections": []
            },
            "KNOWN BUGS": {
                "content": "*       There are too many TODO things. So I can't determind what is BUG. :-)\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Kawai Takanori (Hippo2000) kwitknr@cpan.org\n\nHomepage:\nhttp://member.nifty.ne.jp/hippo2000/            (Japanese)\nhttp://member.nifty.ne.jp/hippo2000/indexe.htm (English)\n\nWiki:\nhttp://www.hippo2000.net/cgi-bin/KbWiki/KbWiki.pl  (Japanese)\nhttp://www.hippo2000.net/cgi-bin/KbWikiE/KbWiki.pl (English)\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "DBI, Spreadsheet::WriteExcel, Spreadsheet::ParseExcel, SQL::Statement\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright (c) 2001 KAWAI,Takanori All rights reserved.\n\nYou may distribute under the terms of either the GNU General Public License or the Artistic\nLicense, as specified in the Perl README file.\n",
                "subsections": []
            }
        }
    }
}