Skip to content

Commit 915fa3e

Browse files
authored
Update xlsx.md
1 parent 1693e37 commit 915fa3e

File tree

1 file changed

+30
-19
lines changed

1 file changed

+30
-19
lines changed

docs/development/xlsx.md

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,44 @@ The abap2UI5 framework allows you to leverage the existing XLSX features of your
77

88
#### Upload
99

10-
Transform uploaded content into an internal table:
10+
Transform uploaded xlsx files into an internal table:
1111

1212
::: code-group
1313

1414
```abap
15-
METHOD z2ui5_if_app~main.
15+
CLASS z2ui5_cl_sample_upload DEFINITION PUBLIC.
1616
17-
client->view_display( z2ui5_cl_xml_view=>factory(
18-
)->page(
19-
)->_z2ui5( )->file_uploader(
20-
value = client->_bind_edit( mv_value )
21-
path = client->_bind_edit( mv_path )
22-
placeholder = 'filepath here...'
23-
upload = client->_event( 'UPLOAD' )
24-
)->stringify( ) ).
17+
PUBLIC SECTION.
18+
INTERFACES Z2UI5_if_app.
19+
DATA mv_path TYPE string.
20+
DATA mv_value TYPE string.
2521
26-
IF client->get( )-event = 'UPLOAD'.
22+
ENDCLASS.
2723
28-
data(lr_itab) = lcl_help=>itab_get_by_xlsx( mv_value ).
29-
"further process with itab...
30-
client->message_box_display( `xlsx uploaded` ).
31-
ENDIF.
24+
CLASS z2ui5_cl_sample_upload IMPLEMENTATION.
25+
METHOD z2ui5_if_app~main.
3226
33-
ENDMETHOD.
27+
client->view_display( z2ui5_cl_xml_view=>factory(
28+
)->page(
29+
)->_z2ui5( )->file_uploader(
30+
value = client->_bind_edit( mv_value )
31+
path = client->_bind_edit( mv_path )
32+
placeholder = 'filepath here...'
33+
upload = client->_event( 'UPLOAD' )
34+
)->stringify( ) ).
35+
36+
IF client->get( )-event = 'UPLOAD'.
37+
38+
data(lr_itab) = lcl_help=>itab_get_by_xlsx( mv_value ).
39+
"further process with itab...
40+
client->message_box_display( `xlsx uploaded` ).
41+
ENDIF.
42+
43+
ENDMETHOD.
44+
ENDCLASS.
3445
```
3546

36-
```abap [LCL_HELP]
47+
```abap [lcl_help]
3748
CLASS lcl_help DEFINITION.
3849
3950
PUBLIC SECTION.
@@ -71,7 +82,7 @@ ENDCLASS.
7182

7283
#### Download
7384

74-
Convert an internal table to an XLSX file and download it as a Base64-encoded file:
85+
Convert an internal table to an XLSX file and download it to the frontend:
7586

7687
::: code-group
7788

@@ -109,7 +120,7 @@ Convert an internal table to an XLSX file and download it as a Base64-encoded fi
109120
ENDMETHOD.
110121
```
111122

112-
```abap [LCL_HELP]
123+
```abap [lcl_help]
113124
class lcl_help DEFINITION.
114125
115126
PUBLIC SECTION.

0 commit comments

Comments
 (0)