Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Create an Excel file in Spreadsheet XML format.

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 examples
Octocat-spinner-32 lib
Octocat-spinner-32 t
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Changes
Octocat-spinner-32 MANIFEST
Octocat-spinner-32 META.yml
Octocat-spinner-32 Makefile.PL
Octocat-spinner-32 README

    Spreadsheet::WriteExcelXML - Create an Excel file in XML format.


    The Spreadsheet::WriteExcelXML module can be used to create an
    Excel file in XML format. The Excel XML format is supported in
    Excel 2002 and 2003.

    Multiple worksheets can be added to a workbook and formatting
    can be applied to cells. Text, numbers, and formulas can be
    written to the cells. The module supports strings up to 32,767
    characters and the strings can be in UTF8 format.

    Spreadsheet::WriteExcelXML uses the same interface as

    This module cannot, as yet, be used to write to an existing
    Excel XML file.


    To write a string, a formatted string, a number and a formula to
    the first worksheet in an Excel XML spreadsheet called perl.xls:

        use Spreadsheet::WriteExcelXML;

        # Create a new Excel workbook
        my $workbook = Spreadsheet::WriteExcelXML->new("perl.xls");

        # Add a worksheet
        $worksheet = $workbook->add_worksheet();

        #  Add and define a format
        $format = $workbook->add_format(); # Add a format

        # Write a formatted and unformatted string, row and column notation.
        $col = $row = 0;
        $worksheet->write($row, $col, "Hi Excel!", $format);
        $worksheet->write(1,    $col, "Hi Excel!");

        # Write a number and a formula using A1 notation
        $worksheet->write('A3', 1.2345);
        $worksheet->write('A4', '=SIN(PI()/4)');


    This module requires Perl 5.005 (or later).


    Use the standard Unix style installation, a ppm for Windows
    users will be available in the next release:

        Unzip and untar the module as follows or use winzip:

            tar -zxvf Spreadsheet-WriteExcel-0.xx.tar.gz

        The module can be installed using the standard Perl procedure:

            perl Makefile.PL
            make test
            make install    # You may need to be root
            make clean      # or make realclean


    John McNamara (
Something went wrong with that request. Please try again.