From ccbdfc56b7fc42039f473173381748558f363fd1 Mon Sep 17 00:00:00 2001 From: Lars Hvam Date: Mon, 24 Jul 2023 19:00:31 +0200 Subject: [PATCH] hmm --- test/cl_excel_test.clas.abap | 5 +++-- test/run.mjs | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/test/cl_excel_test.clas.abap b/test/cl_excel_test.clas.abap index 7309fa8..bdbe797 100644 --- a/test/cl_excel_test.clas.abap +++ b/test/cl_excel_test.clas.abap @@ -1,6 +1,8 @@ CLASS cl_excel_test DEFINITION PUBLIC. PUBLIC SECTION. - CLASS-METHODS run RAISING cx_static_check. + CLASS-METHODS run + RETURNING VALUE(xdata) TYPE xstring + RAISING cx_static_check. ENDCLASS. CLASS cl_excel_test IMPLEMENTATION. @@ -11,7 +13,6 @@ CLASS cl_excel_test IMPLEMENTATION. DATA lo_column TYPE REF TO zcl_excel_column. DATA lv_date TYPE d. DATA lv_time TYPE t. - DATA xdata TYPE xstring. DATA li_writer TYPE REF TO zif_excel_writer. CREATE OBJECT lo_excel. diff --git a/test/run.mjs b/test/run.mjs index 01863d4..4a081f0 100644 --- a/test/run.mjs +++ b/test/run.mjs @@ -1,7 +1,9 @@ import {initializeABAP} from "../output/init.mjs"; import {cl_excel_test} from "../output/cl_excel_test.clas.mjs"; +import * as fs from "node:fs"; await initializeABAP(); const test = new cl_excel_test(); -console.dir(await test.run()); \ No newline at end of file +const buf = Buffer.from((await test.run()).get().toLowerCase(), "hex"); +fs.writeFileSync("foo.xlsx", buf); \ No newline at end of file