-1

I have created one new window application using progress 4gl language. The scope of this application is load the excel sheet and parse the data. But I am facing some problem while parsing the data.Let me share my query what i tried

DEFINE VARIABLE cPartData AS LONGCHAR.
DEFINE VARIABLE gc_FileName            AS CHARACTER  NO-UNDO.
DEFINE VARIABLE gl_OKpressed           AS LOGICAL    NO-UNDO INITIAL TRUE.

DO WITH FRAME {&FRAME-NAME}:
    SYSTEM-DIALOG GET-FILE gc_FileName
        TITLE      "Select Excel File ..."
        FILTERS    "Source Files (*.xlsx)"   "*.xlsx"
        MUST-EXIST
        USE-FILENAME
        UPDATE gl_OKpressed.
    IF gl_OKpressed = TRUE THEN
    DO:
        fiLoadOrderFile:SCREEN-VALUE = gc_FileName.
        COPY-LOB FROM FILE gc_FileName TO cPartData .
        RUN DisplayStatus("Raw Data Copy Completed").
    END.    
END.

END PROCEDURE.

But the issue i am getting is "Invalid character code found in data for codepage ISO8859-1".

I thought the excel file is encrypted but all the data is visible.

Could you please help this case?

Tom Bascom
  • 13,405
  • 2
  • 27
  • 33
Thiru
  • 231
  • 6
  • 20

1 Answers1

1

There is no way this will work. A .xlsx file is not parsable directly in OpenEdge. You need to extract the data. There are various ways of doing that using COM objects, or better .Net in Windows. You could save the data as a .csv and parse that.

jdpjamesp
  • 762
  • 7
  • 19