In automated office, if you want to display only a specified portion of the WPS table, and the remainder is set to hidden, you need to use row and column hide commands more than once. As an Office whiz, you can use VBA code to hide all areas of a selected contiguous area at once.
The first step is to make a document.
Open WPS Form 2009 (online document public beta), create a new blank document, and enter numbers in some areas as a usage area.
Second, click the "Tools"-"Macros"-"create" new macros.
In the third step, enter or copy the following code in Microsoft Visual Basic.
Sub Hiddensurroundrange ()
Dim Celfirst as range, cellast as range
If not Selection are nothing Then
With Selection
' first cell in the currently selected range
Set Celfirst =. Cells (1)
' The last cell in the currently selected range
Set cellast =. Cells (. Cells.count)
End With
If celfirst.address <> "$A $" Then
' Blue Area
With Range ([A1], Celfirst.offset (iif (celfirst.row = 1, 0,-1), IIF (celfirst.column = 1, 0,-1))
' If the current selection does not include the first row, hide the line that contains the blue area
If celfirst.row <> 1 Then. Entirerow.hidden = True
' If the current selection does not include the first column, hide the column that contains the blue area
If celfirst.column <> 1 Then. Entirecolumn.hidden = True
End With
End If
If cellast.address <> "$IV $65536" Then
' A green area similar to the above treatment
With Range (Cellast.offset (iif (cellast.row = 65536, 0, 1), IIF (Cellast.column = 256, 0, 1)),
[IV65536])
If cellast.row <> 65536 Then. Entirerow.hidden = True
If cellast.column <> 256 Then. Entirecolumn.hidden = True
End With
End If
End If
End Sub
Step Fourth, execute the View-tools-Control Toolbox, click button, select the appropriate location to insert a floating "hide" button, and specify a Hiddensurroundrange macro for it.
The fifth step, select the Use area, click the "Hide" button, use the area outside the area for a one-time all hidden.
Tip: WPS default installation does not have a VBA environment, you can not use the macro function, to implement the features described in the tutorial, you need to install VBA,WPS Office Online Document public beta can share documents, as long as there is a mailbox, you can share the VBA documents, eliminating the search, download the pain. Also, because macros are used in the instance, macros are enabled when you open the file.