We're now successfully using Visual COBOL to read data from Excel, which is a victory. But we've got a problem.
Here's relevant program code:
working-storage section.
01 excel-contents PIC X(13).
01 excel-contents-num redefines excel-contents PIC S9(12).
01 W-CELL-VALUE PIC S9(12).
procedure division.
invoke Cell "getValue" returning excel-contents.
MOVE excel-contents-num TO W-CELL-VALUE.
The problem: example -- the Excel cell contains the 15
W-CELL-VALUE should be"000000000015"
instead, we're getting "15 "
We could fix this with some kind of character-handling, but before we try that, is there something simple that we're overlooking?