GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  SPREADSHEET::XLSX (3)

.ds Aq ’

NAME

Spreadsheet::XLSX - Perl extension for reading MS Excel 2007 files;

CONTENTS

SYNOPSIS



 use Text::Iconv;
 my $converter = Text::Iconv -> new ("utf-8", "windows-1251");

 # Text::Iconv is not really required.
 # This can be any object with the convert method. Or nothing.

 use Spreadsheet::XLSX;

 my $excel = Spreadsheet::XLSX -> new (test.xlsx, $converter);

 foreach my $sheet (@{$excel -> {Worksheet}}) {

        printf("Sheet: %s\n", $sheet->{Name});
       
        $sheet -> {MaxRow} ||= $sheet -> {MinRow};
       
         foreach my $row ($sheet -> {MinRow} .. $sheet -> {MaxRow}) {
        
                $sheet -> {MaxCol} ||= $sheet -> {MinCol};
               
                foreach my $col ($sheet -> {MinCol} ..  $sheet -> {MaxCol}) {
               
                        my $cell = $sheet -> {Cells} [$row] [$col];

                        if ($cell) {
                            printf("( %s , %s ) => %s\n", $row, $col, $cell -> {Val});
                        }

                }

        }

 }



DESCRIPTION

This module is a (quick and dirty) emulation of Spreadsheet::ParseExcel for Excel 2007 (.xlsx) file format. It supports styles and many of Excel’s quirks, but not all. It populates the classes from Spreadsheet::ParseExcel for interoperability; including Workbook, Worksheet, and Cell.

SEE ALSO

Text::CSV_XS, Text::CSV_PP http://search.cpan.org/~hmbrand/

A pure perl version is available on http://search.cpan.org/~makamaka/

Spreadsheet::ParseExcel http://search.cpan.org/~kwitknr/
Spreadsheet::ReadSXC http://search.cpan.org/~terhechte/
Spreadsheet::BasicRead http://search.cpan.org/~gng/ for xlscat likewise functionality (Excel only)
Spreadsheet::ConvertAA http://search.cpan.org/~nkh/ for an alternative set of cell2cr () / cr2cell () pair
Spreadsheet::Perl http://search.cpan.org/~nkh/ offers a Pure Perl implementation of a spreadsheet engine. Users that want this format to be supported in Spreadsheet::Read are hereby motivated to offer patches. It’s not high on my todo-list.
xls2csv http://search.cpan.org/~ken/ offers an alternative for my xlscat -c, in the xls2csv tool, but this tool focusses on character encoding transparency, and requires some other modules.
Spreadsheet::Read http://search.cpan.org/~hmbrand/ read the data from a spreadsheet (interface module)

AUTHOR

Dmitry Ovsyanko, <do@eludia.ru<gt>, http://eludia.ru/wiki/

Patches by:



        Steve Simms
        Joerg Meltzer
        Loreyna Yeung  
        Rob Polocz
        Gregor Herrmann
        H.Merijn Brand
        endacoe
        Pat Mariani
        Sergey Pushkin



ACKNOWLEDGEMENTS



        Thanks to TrackVia Inc. (http://www.trackvia.com) for paying for Rob Polocz working time.



COPYRIGHT AND LICENSE

Copyright (C) 2008 by Dmitry Ovsyanko

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 SPREADSHEET::XLSX (3) 2010-05-16

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.