Querylet::Output::Excel::OLE - output query results to Excel via OLE


Querylet-Output-Excel-OLE documentation  | view source Contained in the Querylet-Output-Excel-OLE distribution.

Index


NAME

Top

Querylet::Output::Excel::OLE - output query results to Excel via OLE

VERSION

Top

version 0.142

 $Id: /my/cs/projects/q/excel/trunk/lib/Querylet/Output/Excel/OLE.pm 28050 2006-11-14T23:40:46.906717Z rjbs  $

SYNOPSIS

Top

 use Querylet::Output::Excel::OLE;
 use Querylet;

 database: bogosity

 query:
   SELECT detector_id, measurement
   FROM   bogon_detections

 output format: excel

DESCRIPTION

Top

Querylet::Output::Excel::OLE provides an output handler for Querylet that will create a new instance of Microsoft Excel using Win32::OLE and populate a worksheet with the query results.

METHODS

Top

This module isa Querylet::Output, and implements the interface described by that module.

default_type

The Excel::OLE handler is by default registered for the 'excel' type.

handler

The Querylet::Output::Excel::OLE handler returns a coderef that, when called, will create an Excel.Application object, then create a workbook, and then populate its worksheet with the querylet's results.

If the "excel_workbook" and "excel_worksheet" options are set, it will attempt to open the named workbook file and put its results into the named worksheet, creating it if necessary. If the workbook, but not worksheet, is set, it will create a new worksheet in the named workbook.

If the "excel_postprocessing_callback" option is set, the handler will try to evaluate it into a code reference, the code reference will be called after all other processing is done. It will be passed a hash reference with the following keys:

 query     - the Querylet::Query object being output
 excel     - the Excel.Application object
 workbook  - the Workbook object
 worksheet - the Worksheet object

FUNCTIONS

Top

column_name($column_number)

This converts a column number to a column name, Excel style. In other words:

    1 -> A
   26 -> Z
   27 -> AA
 2600 -> CUZ

AUTHOR

Top

Ricardo SIGNES, <rjbs@cpan.org>

BUGS

Top

Please report any bugs or feature requests to bug-querylet-output-excel-ole@rt.cpan.org, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

COPYRIGHT

Top


Querylet-Output-Excel-OLE documentation  | view source Contained in the Querylet-Output-Excel-OLE distribution.