Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Ektoras Giorgos
New Member.
981 views

Excel - Rows and Columns

Jump to solution

Hello,

I am trying to open an excel document and then count the total number of Rows and Columns. But somethings i am doing wrong and i get meaningless or same numbers (depents on putting USAGE COMP-3 or not at the end of W-BX-CELL-DATA variable)

77 excel-app handle of application.
77 excel-workbook handle of workbook.
77 excel-sheets handle of sheets.
77 excel-worksheet handle of worksheet.

01 TARGET.
      05 CELL-LETTER1 PIC X VALUE IS " ".
      05 CELL-LETTER2 PIC X.
      05 CELL-NUMBER PIC 9(6).

01 W-BX-CELL-DATA PIC X(100) VALUE SPACES.

******************************now the routine***********************

INQUIRE excel-worksheet @Range(TARGET)::End(xlDown)::Row IN W-BX-CELL-DATA.
MOVE SPACES TO W-BX-CELL-DATA
INQUIRE excel-worksheet @Range(TARGET)::End(xlToRight)::Column IN W-BX-CELL-DATA.

Tags (1)
0 Likes
1 Solution

Accepted Solutions
neidingd Honored Contributor.
Honored Contributor.

RE: Excel - Rows and Columns

Jump to solution

I hope this link will help you with your Problem:

stackoverflow.com/.../excel-vba-xldown

View solution in original post

0 Likes
1 Reply
neidingd Honored Contributor.
Honored Contributor.

RE: Excel - Rows and Columns

Jump to solution

I hope this link will help you with your Problem:

stackoverflow.com/.../excel-vba-xldown

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.