Complete Excel Support
Generate Excel 2007+ files (.xlsx) with full support for worksheets, styling, formulas, charts, and images. Read existing files with full preservation of formatting.
The powerful ABAP library for reading and generating Excel spreadsheets directly from SAP systems
abap2xlsx is a comprehensive ABAP library for creating and reading Excel spreadsheets directly from SAP systems. It provides a complete object-oriented interface for generating Excel files with advanced formatting, charts, images, and seamless business logic integration.
DATA: lo_excel TYPE REF TO zcl_excel,
lo_worksheet TYPE REF TO zcl_excel_worksheet,
lo_writer TYPE REF TO zcl_excel_writer_2007.
CREATE OBJECT lo_excel.
lo_worksheet = lo_excel->get_active_worksheet( ).
lo_worksheet->set_cell( ip_column = 'A' ip_row = 1 ip_value = 'Hello World!' ).
CREATE OBJECT lo_writer.
DATA(lv_xstring) = lo_writer->write_file( lo_excel ).
lo_worksheet->bind_table(
ip_table = lt_data
ip_table_settings = VALUE #(
table_style = zcl_excel_table=>builtinstyle_medium2
show_row_stripes = abap_true
show_filter_dropdown = abap_true
)
).
DATA(lo_conditional) = NEW zcl_excel_style_cond( ).
lo_conditional->set_range( 'A1:A100' )
->set_rule_type( zcl_excel_style_cond=>c_rule_cellis )
->set_operator( zcl_excel_style_cond=>c_operator_greaterthan )
->set_formula( '1000' ).
lo_worksheet->add_style_conditional( lo_conditional ).
Class | Purpose |
---|---|
zcl_excel | Main workbook container and entry point |
zcl_excel_worksheet | Individual worksheet management |
zcl_excel_writer_2007 | Standard XLSX file writer |
zcl_excel_writer_huge_file | Optimized writer for large datasets |
zcl_excel_reader_2007 | Excel file reader and parser |
zcl_excel_converter | Data conversion utilities |
After installation, verify these key objects exist:
ZCL_EXCEL
, ZCL_EXCEL_WORKSHEET
, ZCL_EXCEL_WRITER_2007
ZDEMO_EXCEL*
reports for testing and examplesRequirement | Details |
---|---|
SAP System | Minimum SAP_ABA 731 (may work on older versions) |
Developer Access | Package creation and transport rights |
Installation Tool | abapGit (recommended) or SAPLink (legacy) |
Network Access | HTTPS connectivity for online installation |
Get started with abap2xlsx using abapGit:
https://github.com/abap2xlsx/abap2xlsx.git
$abap2xlsx
or ZABAP2XLSX
Issue | Solution |
---|---|
Objects won't activate | Follow exact activation order for SAPLink installations |
HTTPS connection fails | Use offline ZIP installation method |
Package naming conflicts | Use unique names, avoid underscore patterns |
Version verification | Check ZCL_EXCEL=>VERSION attribute or demo file properties |
We welcome contributions! Whether it's bug fixes, new features, or documentation improvements, your help makes abap2xlsx better for everyone.
Ready to start? Check out the Quick Start Guide to create your first Excel file in minutes!
This documentation is maintained by the abap2xlsx community. Found an issue? Report it or contribute a fix!