[Stackoverflow] [Progress OpenEdge ABL] How to load Excel file to database using progress 4GL language?

Status
Not open for further replies.
T

Thiru Malai

Guest
I written one program to load the excel sheet to db but is there any possibilities to load from specific directory where the excel file is present?

DEFINE INPUT PARAMETER localName AS CHARACTER.

CASE localname :

WHEN "CustomerItem":U THEN DO:
FIND tt_covd WHERE ROWID(tt_covd) = detailRowID NO-LOCK NO-ERROR.
IF NOT AVAILABLE tt_covd THEN DO:
RETURN ERROR "Error Parsing - No Record found".
END.
ELSE
ASSIGN
tt_covd.covd_item = string(cCurrentElementData).
END.

WHEN "ShipTime":U THEN DO:

FIND tt_covh WHERE ROWID(tt_covh) = headerRowID NO-LOCK NO-ERROR.
IF NOT AVAILABLE tt_covh THEN DO:
RETURN ERROR "Error Parsing - No Record found".
END.
ELSE IF cCurrentElementData <> "" THEN
ASSIGN
tt_covh.covh_due_time = (INTEGER ( ENTRY( 1 , cCurrentElementData , ":" )) * 60 * 60 ) +
(INTEGER ( ENTRY( 2 , cCurrentElementData , ":" )) * 60 ) .
END.

END CASE.

CREATE comh_corder_version_head.
ASSIGN
comh_corder_version_head.covh_id = tt_covd.covd_item
comh_corder_version_head.covh_due_time = tt_covh.covh_due_time.

Continue reading...
 
Status
Not open for further replies.
Top