diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..03fe105
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,18 @@
+name: test
+
+on:
+ pull_request:
+
+permissions:
+ contents: read
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ timeout-minutes: 10
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ - run: |
+ npm install
+ npm run build
\ No newline at end of file
diff --git a/public/index.html b/public/index.html
index 1246592..5164249 100644
--- a/public/index.html
+++ b/public/index.html
@@ -8,7 +8,7 @@
-
Dropdown, Revert
+
Todo: Dropdown, Revert
diff --git a/src/abap.ts b/src/abap.ts
new file mode 100644
index 0000000..f83b50d
--- /dev/null
+++ b/src/abap.ts
@@ -0,0 +1,63 @@
+// this is a temporary hack, it needs to update whenever the demos repo update
+
+export const zif_excel_demo_output = `INTERFACE zif_excel_demo_output PUBLIC.
+ CLASS-METHODS run
+ RETURNING
+ VALUE(ro_excel) TYPE REF TO zcl_excel
+ RAISING
+ zcx_excel.
+ENDINTERFACE.`;
+
+export const zcl_excel_demo1 = `CLASS zcl_excel_demo1 DEFINITION PUBLIC.
+ PUBLIC SECTION.
+ INTERFACES zif_excel_demo_output.
+ENDCLASS.
+
+CLASS zcl_excel_demo1 IMPLEMENTATION.
+
+ METHOD zif_excel_demo_output~run.
+
+ DATA: lo_worksheet TYPE REF TO zcl_excel_worksheet,
+ lo_hyperlink TYPE REF TO zcl_excel_hyperlink,
+ lo_column TYPE REF TO zcl_excel_column,
+ lv_date TYPE d,
+ lv_time TYPE t.
+
+ CREATE OBJECT ro_excel.
+
+ " Get active sheet
+ lo_worksheet = ro_excel->get_active_worksheet( ).
+ lo_worksheet->set_cell( ip_column = 'B' ip_row = 2 ip_value = 'Hello world' ).
+ lv_date = '20211231'.
+ lv_time = '055817'.
+ lo_worksheet->set_cell( ip_column = 'B' ip_row = 3 ip_value = lv_date ).
+ lo_worksheet->set_cell( ip_column = 'C' ip_row = 3 ip_value = lv_time ).
+ lo_hyperlink = zcl_excel_hyperlink=>create_external_link( iv_url = 'https://abap2xlsx.github.io/abap2xlsx' ).
+ lo_worksheet->set_cell( ip_columnrow = 'B4' ip_value = 'Click here to visit abap2xlsx homepage' ip_hyperlink = lo_hyperlink ).
+
+ lo_worksheet->set_cell( ip_column = 'B' ip_row = 6 ip_value = '你好,世界' ).
+ lo_worksheet->set_cell( ip_column = 'C' ip_row = 6 ip_value = '(Chinese)' ).
+ lo_worksheet->set_cell( ip_column = 'B' ip_row = 7 ip_value = 'नमस्ते दुनिया' ).
+ lo_worksheet->set_cell( ip_column = 'C' ip_row = 7 ip_value = '(Hindi)' ).
+ lo_worksheet->set_cell( ip_column = 'B' ip_row = 8 ip_value = 'Hola Mundo' ).
+ lo_worksheet->set_cell( ip_column = 'C' ip_row = 8 ip_value = '(Spanish)' ).
+ lo_worksheet->set_cell( ip_column = 'B' ip_row = 9 ip_value = 'مرحبا بالعالم' ).
+ lo_worksheet->set_cell( ip_column = 'C' ip_row = 9 ip_value = '(Arabic)' ).
+ lo_worksheet->set_cell( ip_column = 'B' ip_row = 10 ip_value = 'ওহে বিশ্ব ' ).
+ lo_worksheet->set_cell( ip_column = 'C' ip_row = 10 ip_value = '(Bengali)' ).
+ lo_worksheet->set_cell( ip_column = 'B' ip_row = 11 ip_value = 'Bonjour le monde' ).
+ lo_worksheet->set_cell( ip_column = 'C' ip_row = 11 ip_value = '(French)' ).
+ lo_worksheet->set_cell( ip_column = 'B' ip_row = 12 ip_value = 'Olá Mundo' ).
+ lo_worksheet->set_cell( ip_column = 'C' ip_row = 12 ip_value = '(Portuguese)' ).
+ lo_worksheet->set_cell( ip_column = 'B' ip_row = 13 ip_value = 'Привет, мир' ).
+ lo_worksheet->set_cell( ip_column = 'C' ip_row = 13 ip_value = '(Russian)' ).
+ lo_worksheet->set_cell( ip_column = 'B' ip_row = 14 ip_value = 'ہیلو دنیا' ).
+ lo_worksheet->set_cell( ip_column = 'C' ip_row = 14 ip_value = '(Urdu)' ).
+ lo_worksheet->set_cell( ip_column = 'B' ip_row = 15 ip_value = '👋🌎, 👋🌍, 👋🌏' ).
+ lo_worksheet->set_cell( ip_column = 'C' ip_row = 15 ip_value = '(Emoji waving hand + 3 parts of the world)' ).
+
+ lo_column = lo_worksheet->get_column( ip_column = 'B' ).
+ lo_column->set_width( ip_width = 11 ).
+ ENDMETHOD.
+
+ENDCLASS.`;
\ No newline at end of file
diff --git a/src/index.css b/src/index.css
index 2797b3a..8dacf07 100644
--- a/src/index.css
+++ b/src/index.css
@@ -37,4 +37,10 @@ body, html, .inner, .outer {
select {
width: 100%;
+}
+
+iframe {
+ display: block;
+ width: 100%;
+ height: 100%;
}
\ No newline at end of file
diff --git a/src/index.ts b/src/index.ts
index 2da6120..193429c 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -21,13 +21,14 @@ import {ABAP, MemoryConsole} from "@abaplint/runtime";
import * as abaplint from "@abaplint/core";
import * as abapMonaco from "@abaplint/monaco";
import Split from "split-grid";
+import { zcl_excel_demo1 } from "./abap";
const reg = new abaplint.Registry(new abaplint.Config(JSON.stringify(config)));
abapMonaco.registerABAP(reg);
const filename = "file:///zcl_demo.clas.abap";
const model1 = monaco.editor.createModel(
- "WRITE 'hello'.",
+ zcl_excel_demo1,
"abap",
monaco.Uri.parse(filename),
);