Excel::Writer::XLSX — XlsxWriter Documentation

### Navigation

- index
- next |
- previous |
- XlsxWriter Documentation »

# Excel::Writer::XLSX

Excel::Writer::XLSX is a module written in Perl for creating Excel 2007+ XLSX files.

Excel::Writer::XLSX is an API compatible rewrite of an older Perl module called Spreadsheet::WriteExcel that creates Excel XLS file.

In terms of features Excel::Writer::XLSX is one most complete open source libraries for writing Excel files. It supports:

- Multiple worksheets
- Strings and numbers
- Unicode text
- Cell formatting
- Formulas
- Images
- Charts
- Autofilters
- Data validation
- Conditional formatting
- Macros
- Tables
- Shapes
- Sparklines
- Hyperlinks
- Rich string formats
- Defined names
- Grouping/Outlines
- Cell comments
- Panes
- Page set-up and printing options

Excel::Writer::XLSX has comprehensive documentation, a large number of example files and an extensive test suite.

Excel::Writer::XLSX and XlsxWriter are written by John McNamara.

## Compatibility with Excel::Writer::XLSX

Porting of `Excel::Writer::XLSX` to `XlsxWriter` is a work in progress. The following table shows the level of compatibility between the two module:

Workbook Methods | XlsxWriter | Excel::Writer::XLSX
--- | --- | ---
new() | Yes | Yes
add_worksheet() | Yes | Yes
add_format() | Yes | Yes
add_chart() | No | Yes
add_shape() | No | Yes
add_vba_project() | No | Yes
close() | Yes | Yes
set_properties() | No | Yes
define_name() | No | Yes
set_tempdir() | No | Yes
set_custom_color() | No | Yes
sheets() | No | Yes
set_1904() | No | Yes
set_optimization() | No | Yes

Worksheet Methods | XlsxWriter | Excel::Writer::XLSX
--- | --- | ---
write() | Yes | Yes
write_number() | Yes | Yes
write_string() | Yes | Yes
write_rich_string() | Yes | Yes
write_blank() | Yes | Yes
write_row() | No | Yes
write_col() | No | Yes
write_date_time() | Yes | Yes
write_url() | No | Yes
write_formula() | Yes | Yes
write_array_formula() | Yes | Yes
keep_leading_zeros() | No | Yes
write_comment() | No | Yes
show_comments() | No | Yes
set_comments_author() | No | Yes
add_write_handler() | No | Yes
insert_image() | No | Yes
insert_chart() | No | Yes
insert_shape() | No | Yes
insert_button() | No | Yes
data_validation() | No | Yes
conditional_formatting() | No | Yes
add_sparkline() | No | Yes
add_table() | No | Yes
get_name() | No | Yes
activate() | Yes | Yes
select() | Yes | Yes
set_first_sheet() | No | Yes
protect() | No | Yes
set_selection() | No | Yes
set_row() | Yes | Yes
set_column() | Yes | Yes
set_default_row() | No | Yes
outline_settings() | No | Yes
freeze_panes() | No | Yes
split_panes() | No | Yes
merge_range() | No | Yes
merge_range_type() | No | Yes
set_zoom() | No | Yes
right_to_left() | No | Yes
hide_zero() | No | Yes
set_tab_color() | No | Yes
autofilter() | No | Yes
filter_column() | No | Yes
filter_column_list() | No | Yes

Page Set-up Methods | XlsxWriter | Excel::Writer::XLSX
--- | --- | ---
set_landscape() | Yes | Yes
set_portrait() | Yes | Yes
set_page_view() | Yes | Yes
set_paper() | Yes | Yes
center_horizontally() | Yes | Yes
center_vertically() | Yes | Yes
set_margins() | Yes | Yes
set_header() | Yes | Yes
set_footer() | Yes | Yes
repeat_rows() | Yes | Yes
repeat_columns() | Yes | Yes
hide_gridlines() | Yes | Yes
print_row_col_headers() | Yes | Yes
print_area() | No | Yes
print_across() | Yes | Yes
fit_to_pages() | No | Yes
set_start_page() | No | Yes
set_print_scale() | No | Yes
set_h_pagebreaks() | No | Yes
set_v_pagebreaks() | No | Yes

Format Methods | XlsxWriter | Excel::Writer::XLSX
--- | --- | ---
set_font_name() | Yes | Yes
set_font_size() | Yes | Yes
set_font_color() | Yes | Yes
set_bold() | Yes | Yes
set_italic() | Yes | Yes
set_underline() | Yes | Yes
set_font_strikeout() | Yes | Yes
set_font_script() | Yes | Yes
set_font_outline() | Yes | Yes
set_font_shadow() | Yes | Yes
set_num_format() | Yes | Yes
set_locked() | Yes | Yes
set_hidden() | Yes | Yes
set_align() | Yes | Yes
set_rotation() | Yes | Yes
set_text_wrap() | Yes | Yes
set_text_justlast() | Yes | Yes
set_center_across() | Yes | Yes
set_indent() | Yes | Yes
set_shrink() | Yes | Yes
set_pattern() | Yes | Yes
set_bg_color() | Yes | Yes
set_fg_color() | Yes | Yes
set_border() | Yes | Yes
set_bottom() | Yes | Yes
set_top() | Yes | Yes
set_left() | Yes | Yes
set_right() | Yes | Yes
set_border_color() | Yes | Yes
set_bottom_color() | Yes | Yes
set_top_color() | Yes | Yes
set_left_color() | Yes | Yes
set_right_color() | Yes | Yes

### Navigation

- index
- next |
- previous |
- XlsxWriter Documentation »