Skip to content

R52.beta discussion #147

@ddTech

Description

@ddTech

Good morning Greg,

how about adding a flag isRawData (better / other name welcome) to the class that is being set by openXLSXWorkbook() and openXLSXWorkbookEx() accordingly?

I added a protected property _isRawData as well as isRawData with an access method to my R52.beta

This now allows for dual use of methods like .GetLastRowNumber()

LPARAMETERS tnWB, tnSh
LOCAL ARRAY laMaxRow[1]
IF PCOUNT() < 2
	RETURN .NULL.
ENDIF

if this._isRawData
	SELECT MAX(row) FROM xl_sheetcells ;
		WHERE workbook = tnWB ;
			AND sheet = tnSh ;
		INTO ARRAY laMaxRow
else
	SELECT MAX(row) FROM xl_cells ;
		WHERE workbook = tnWB ;
			AND sheet = tnSh ;
			AND celldeleted = False ;
		INTO ARRAY laMaxRow
endif		

IF  _TALLY > 0 .AND. VARTYPE(laMaxRow[1]) = "N"
	RETURN laMaxRow[1]
ELSE
	RETURN 0
ENDIF

Other methods could redirect to the appropriate ones ( .getCellValue -> .getCellValueEx() ), return valid information or simply inform the developer that the useage is not possible in this or the other context.

Regards

Frank

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions