spreadsheetimporter / ui5-cc-spreadsheetimporter

A UI5 Component to integrate a Spreadsheet Upload for UI5 Apps.
https://spreadsheet-importer.com/
Apache License 2.0
84 stars 16 forks source link

[Bug]: Cannot read properties - Column label undefined #647

Closed AgusFiCa closed 6 days ago

AgusFiCa commented 6 days ago

OData Version

OData V4

Draft

Yes

Scenario

List Report

Environment

BAS / ABAP RAP

UI5 Spreadsheet Component

1.4.2

What happened?

When using spreadsheet importer in an Odata v4 RAP application, if column header (lineitem) does not have label explicitly defined, it fails.

Image

Relevant log output

Log-dbg.js:499 2024-11-12 12:06:14.750300 Error setting 'setContext' - TypeError: Cannot read properties of undefined (reading 'startsWith') SpreadsheetUpload: SpreadsheetUpload 
 TypeError: Cannot read properties of undefined (reading 'startsWith')
    at e.t [as getLabel] (MetadataHandlerV4-dbg.js:123:17)
    at e.t [as getLabelList] (MetadataHandlerV4-dbg.js:98:41)
    at t [as getLabelList] (ODataV4-dbg.js:129:40)
    at t.e [as setContext] (SpreadsheetUpload-dbg.js:123:52)
    at async t.e [as initialSetup] (SpreadsheetUpload-dbg.js:68:9)
    at async t.e [as openSpreadsheetUploadDialog] (SpreadsheetUpload-dbg.js:165:7)
g @ Log-dbg.js:499

Spreadsheet Component Init

openSpreadsheetUploadDialog: async function (event) {
  this.editFlow.getView().setBusyIndicatorDelay(0);
  this.editFlow.getView().setBusy(true);
  this.spreadsheetUpload = await this.editFlow.getView()
    .getController()
    .getAppComponent()
    .createComponent({
      usage: "spreadsheetImporter",
      async: true,
      componentData: {
        context: this,
      },
    });
  this.spreadsheetUpload.openSpreadsheetUploadDialog();
  this.editFlow.getView().setBusy(false);
}

Manifest

marianfoo commented 6 days ago

Hi @AgusFiCa thank you for your bug report. Please attach the metadata.xml or send it to marian@marianzeis.de so i can recreate the error. Thanks!