cancel
Showing results for 
Search instead for 
Did you mean: 

Data range in Analysis Office Excel

Former Member
0 Kudos

Hi folks,

I am currently trying to find any specification, if there is a possibility given by SAP Analysis to determine the range object of the crosstable

of the actual datasource.

something like range of DS_1

In BEx it was simple to use the SAP BEx exit and read the myRange object with calculating # of rows or columns

Is there any hidden part in Analysis office as well?

I will try to avoid using Excel last cell or such excal functions if possible.

Any help is appreciated

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

take the name of the crosstab and insert a "SAP" before it, then you get the named range of the crosstab.

Best regards,

Victor

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Victor,

Great!!!!

Exactely what I was looking for.

SO now I am free to walk through the returned data and can dynamically add my own functionality to AO crosstab

maybe other users need this info as well so I'll share my little Dimensions of crosstab

Just add a module t your AO Workbook

here comes the coding that will give you start row, end row , start COlumn and Endcolumn of your gicen crosstab(related to datasource/ provider

@Victor:

Thanks for the speedy and perfect answer

Public Sub Callback_AfterRedisplay()

' defined in a module by Joerg Boeke

Dim ifirstrow As Integer, ilastrow As Integer, ifirstcol As Integer, ilastcol As Integer

Get_AO_Dimension "SAPCrosstab1", ifirstrow, ilastrow, ifirstcol, ilastcol

'

End Sub

Public Function Get_AO_Dimension(strCrosstab_ID As String, ifirstrow As Integer, ilastrow As Integer, iFirstColumn As Integer, iLastColumn As Integer)

ifirstrow = Range(strCrosstab_ID).Row

ilastrow = Range(strCrosstab_ID).Rows.Count + ifirstrow - 1

iFirstColumn = Range(strCrosstab_ID).Column

iLastColumn = Range(strCrosstab_ID).Columns.Count + iFirstColumn - 1

End Function