Comparison with Excel::Writer::XLSX — XlsxWriter Documentation

### Navigation

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

# Comparison with 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

Status: ongoing.

Workbook Methods | XlsxWriter | Excel::Writer::XLSX
--- | --- | ---
`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()` | Yes | Yes
`define_name()` | Yes | Yes
set_tempdir() | No | Yes
set_custom_color() | No (1) | Yes
`worksheets()` | Yes (2) | Yes
set_1904() | No | Yes
set_optimization() | Yes (3) | Yes

1. Not required in XlsxWriter. Full RGB colors are supported.
2. Called `sheets()` in Excel::Writer::XLSX.
3. This is a constructor parameter in XlsxWriter.

### Worksheet

Status: ongoing.

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()` | Yes | Yes
`write_column()` | Yes | Yes
`write_datetime()` | Yes | Yes
`write_url()` | Yes | Yes
`write_formula()` | Yes | Yes
`write_array_formula()` | Yes | Yes
keep_leading_zeros() | No | Yes
`write_comment()` | Yes | Yes
`show_comments()` | Yes | Yes
`set_comments_author()` | Yes | Yes
add_write_handler() | No | Yes
`insert_image()` | Yes | Yes
insert_chart() | No | Yes
insert_shape() | No | Yes
insert_button() | No | Yes
`data_validation()` | Yes | Yes
`conditional_format()` | Yes (1) | Yes
add_sparkline() | No | Yes
add_table() | No | Yes
`get_name()` | Yes | Yes
`activate()` | Yes | Yes
`select()` | Yes | Yes
`hide()` | Yes | Yes
`set_first_sheet()` | Yes | Yes
`protect()` | Yes | 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()` | Yes | Yes
merge_range_type() | No (2) | Yes
`set_zoom()` | Yes | Yes
`right_to_left()` | Yes | Yes
`hide_zero()` | Yes | Yes
`set_tab_color()` | Yes | Yes
`autofilter()` | Yes | Yes
`filter_column()` | Yes | Yes
`filter_column_list()` | Yes | Yes

1. Called `conditional_formatting()` in Excel::Writer::XLSX.
2. Not required in XlsxWriter. The same functionality is available via `merge_range()`.

### Page Setup

Status: complete.

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()` | Yes | Yes
`print_across()` | Yes | Yes
`fit_to_pages()` | Yes | Yes
`set_start_page()` | Yes | Yes
`set_print_scale()` | Yes | Yes
`set_h_pagebreaks()` | Yes | Yes
`set_v_pagebreaks()` | Yes | Yes

### Format

Status: complete.

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_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 »