2003 – 2011 Techedge - All rights reservedAny Techedge external diffusion is forbidden, except if specifically authorized
ISO 9001:2008
Ivan FemiaSCN Active Member
@IvanFemia
Generate your professionalExcel spreadsheet from ABAP
abap2xlsx
Date: July 2011
Agenda
2
Introduction
Export data AS-IS
• Standard solution
• Custom solution
abap2xlsx solution
Why abap2xlsx?
Orchestration
abap2xlsx on Code Exchange
References
Agenda
3
Introduction
Export data AS-IS
• Standard solution
• Custom solution
abap2xlsx solution
Why abap2xlsx?
Orchestration
abap2xlsx on Code Exchange
References
4
Mr. abap2xlsx ID
abap2xlsxCommunity Driven project for happier users
BirthdayJuly, 12th 2010
Numbersmost viewed SDN blog of 2010most popular project on SAP Code Exchangemore than 2,500 downloadsmore than 150 project members9 active developers
AddressCode Exchange at https://cw.sdn.sap.com/cw/groups/abap2xlsx
StandardOpen XML supported by MS Excel 2007, MS Excel 2010, LibreOffice, Open Officeand many others
The goal
5
Improving ABAP capabilities to create and read rich .xlsx files
“you know, to work I use this Excel but now we need to upload it into the system…”
Some days later…
“well Ivan, you know, to work I need to download from the system an Excel like this…”
The problem space
6
The result
7
Wow
The result
8
“Ivan, you know, everyday the system has also to eMail the Excel to each recipient and
let them download an fresh version from our portal”
“before going home, Ivan remember that recipients need also to update the Excel and
send it back to the system…”
“he’s a bit crazy, whenhe can’t do his simplejob, he begin speakingalone. He believes in a
community…”
“I have to say himeverything to do
but he’s not a badguy”
Agenda
9
Introduction
Export data AS-IS
• Standard solution
• Custom solution
abap2xlsx solution
Why abap2xlsx?
Orchestration
abap2xlsx on Code Exchange
References
Standard solution
10
Most of the standard SAP components (such as ABAP ALV, WebDynpro ALV, System
menu, etc.) provide the option to export data in MS Excel 2003 or in many other MS
Excel compatible file formats (csv, plain text, mhtml and so on).
What are the limits?
Depend on SAP GUI or Web Dynpro
Are not available for example in case you want to
send it as email attachment or in a batch process.
Have a no professional Look and Feel
Custom solution
11
To avoid some limitations and create spreadsheet with a professional look and feel
SAP Mentor Sergio Ferrari proposed in 2006 a great trick: create an HTML file and
open in Excel.
What are the limits again?
Only one sheet for each workbook
No conditional formatting
HTML extension is not associated by default
with MS Excel
No advanced features
Custom solution
12
Community was really active, SDN contributors began to create workbooks using the
OLE Object technology; this was a good approach with great results, but…
What are the limits?
SAPGui dependent
Cannot be used in a no dialog process
Cannot send as email attachment (without some
dirty trick)
Is platform dependent
Export data AS-IS
13
Which one do you prefer?
New frontiers
14
I prefer this one!
abap2xlsx inside – full optional – unlimited miles
Agenda
15
Introduction
Export data AS-IS
• Standard solution
• Custom solution
abap2xlsx solution
Why abap2xlsx?
Orchestration
abap2xlsx on Code Exchange
References
Old scenario
16
It is so difficultto analyze the
data
abap2xlsx scenario
17
Green light!I can get my
bonus this year!
abap2xls solution
18
On June 2010 I had an idea; use ABAP to create Excel from scratch based on Open XML
standard.
Basically abap2xlsx is a powerfull ABAP framework that creates pure Excel files
directly from ABAP without any plugin.
Open XML was developed by Microsoft starting from 2000 and has been standardized
in 2006 by Ecma International (as ECMA-376) and in 2008 by ISO and IEC (ISO/IEC
29500).
In Microsoft Office 2007 Suite, Open XML become the default file format for all
documents (Excel, Word, Power Point).
Open XML
19
Open XML
20
An Office Open XML file is a ZIP-compatible OPC package containing XML documents
and other resources. That is, one can see the contents of an OOXML file, for example
by renaming it to a .zip file and opening it with any zip tool. The actual .xml files can
then be viewed in a web browser or a plain text editor.
Agenda
21
Introduction
Export data AS-IS
• Standard solution
• Custom solution
abap2xlsx solution
Why abap2xlsx?
Orchestration
abap2xlsx on Code Exchange
References
Compare tecnologies
22
SCN Olympic Games2011
CSV Properties
23
HTML & MHTML Properties
24
Cell style
Images
Formulas
External Hyperlinks
Column merge
Text alignment
Row merge
Font styles
OLE Properties
25
Font styles
Cell style
Data validationImages
Sheet protection
Workbook protection
Sheet hiding
Formulas
Password protection
Page layout
External Hyperlinks
Internal Hyperlinks
Freezing panes
Ranges
Column merge
Row merge
Column size
Row height
Column hide
Row hide
Iconset
Conditional formatting
Text alignment
Shrink text
Hide zerosPrint settings
Gridlines control
Hide/Show cell labels
Cell formatCell lock
Table auto filter
Table totals Multi sheets
Table style
abap2xlsx properties
26
Font styles
Cell style
Data validationImages
Visual Basic forApplication
Sheet protection
Workbook protection
Sheet hiding
Formulas
RGB Colors
Color tynts XLSX Reader
Password protection
Table binding
Table style
Page layout
External Hyperlinks
Internal Hyperlinks
Freezing panes
Ranges
Column merge
Row merge
Column size
Row height
Column hide
Row hide
Iconset
Conditional formatting
Text alignment
Shrink text
Hide zerosPrint settings
Gridlines control
Hide/Show cell labels
Cell format
i8n compliant
SU01 proprerties
Export in CSV
Export in XLSM
Cell lock
Table auto filter
Table totals
DDIC Field Label
Batch support
Multi sheets
Final result
27
CSV
OLE
MHTMLabap2xlsx
Demo time
28
Agenda
29
Introduction
Export data AS-IS
• Standard solution
• Custom solution
abap2xlsx solution
Why abap2xlsx?
Orchestration
abap2xlsx on Code Exchange
References
Orchestration
30
Is abap2xls ready for orchestration?
Orchestration
31
Ok serious! Is abap2xls ready for orchestration?
Orchestration
32
Orchestration
33
SAPGui NetWeaver Business Client
Orchestration
34
Orchestration
35
Orchestration
36
Orchestration
37
Agenda
38
Introduction
Export data AS-IS
• Standard solution
• Custom solution
abap2xlsx solution
Why abap2xlsx?
Orchestration
abap2xlsx on Code Exchange
References
Informations: Download, Install and Learn
39
abap2xlsx is the leading project on SAP Code Exchange platform
It has more than 150 active members and 9 contributors
It is free and it is released under SAP NetWeaver Developer License Agreement (NDLA)
Stable releases are distributed as nugg file (SAPLink) and Transport Request
There are about 30 demos available to test and learn abap2xlsx
Code Exchange
40
References
41
Open XML definition
http://en.wikipedia.org/wiki/Office_Open_XML
Standard ECMA-376
http://www.ecma-international.org/publications/standards/Ecma-376.htm
Standard ISO/IEC 29500-1:2008
http://www.iso.org/iso/catalogue_detail?csnumber=51463
abap2xlsx SDN related blogs
http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/u/251856298
abap2xlsx Code Exchange project
https://cw.sdn.sap.com/cw/groups/abap2xlsx
All rights reserved
42