
22 Wis.2d 414 (1964)
WEEDEN, Taxpayer, Appellant,
v.
CITY OF BELOIT, Respondent.
Supreme Court of Wisconsin.
January 8, 1964.
February 4, 1964.
*416 For the appellant there were briefs and oral argument by Clyde E. Sheets of Milwaukee.
For the respondent there was a brief by Garrigan, Keithley, O'Neal, Dobson & Elliott of Beloit, and oral argument by Roger D. O'Neal.
FAIRCHILD, J.
It is undisputed that plaintiff was an owner of real estate taken by the city under the provisions of ch. 32, Stats.; that a jurisdictional offer was served; and that this action was commenced more than forty days after service of the jurisdictional offer. Sec. 32.06 (5), Stats., provides a remedy for an owner who desires to contest the right of the condemnor for any reason other than inadequacy of the amount of the offer. He may bring an action within forty days from the date of service of the offer. The remedy is exclusive, for the statute provides:
"... Such action shall be the only manner in which any issue other than . . . [amount or title] may be raised pertaining to the condemnation of the property described in the jurisdictional offer. . . If such action is not commenced within the time limited the owner or other person having any interest in the property shall be forever barred from raising any such objection in any other manner. . . ."[1]
It is clear enough that in the instant action plaintiff will seek a declaration that the city had no authority to take his *417 property. This is true even though his wife and co-owner is not a party, even though he purports to act on behalf of others as well as himself, and even though it is conceivable that he might frame a complaint which would attack the validity of expenditures by the city on some ground which would not affect the validity of the taking of the property described in his affidavit. He did assert ownership of the described property in his affidavit, and said nothing to limit the action to other issues.
We consider that because of the lapse of time, sec. 32.06 (5), Stats., deprives the court of jurisdiction to hear the action with its intended scope.
Sec. 326.12(6), Stats., authorizes the court or judge to limit the subjects of discovery needed to plead. A court will wholly deny the examination when from the statement of the nature and object of the action it affirmatively appears that the plaintiff has no cause of action.[2] Such powers are sparingly used, but afford protection against the abuse of this type of discovery procedure. If the action were not dismissed and if the plaintiff were unable to state a cause of action, he would either fail to file a complaint upon demand, or a demurrer to it would be sustained. If he could state a cause of action, but an unassailable affirmative defense exists, defendant would obtain summary judgment. Dismissal of the action would follow in any event. Judge GOLLMAR considered the procedural problem, but was of the opinion that it would be fruitless to go through all the steps, when the ultimate result was inevitable.
"The power to dismiss groundless, vexatious, and harassing litigations is inherent in the courts. Thus, although an action will not be dismissed merely because it is vexatious, *418 a vexatious action will be dismissed where it is clear that there is no meritorious cause of action, . . ."[3]
We conclude the action was properly dismissed.
We note, however, that the dismissal is "upon its merits with prejudice." There are no pleadings to define the scope of the action, and it is conceivable that Weeden, as taxpayer, might be able to frame a complaint challenging projects or expenditures of the city without challenging the validity of the taking of the described real estate. The judgment should therefore be modified so that this phrase will read, "upon its merits and with prejudice except that the dismissal is without prejudice to the institution of actions which will not involve the validity of condemnation of the property described in plaintiff's affidavit of discovery."
By the Court.Judgment modified in accordance with the opinion on file and, as so modified, affirmed. Defendant may tax costs in this court.
NOTES
[1]  See Arrowhead Farms, Inc., v. Dodge County (1963), 21 Wis. (2d) 647, 124 N. W. (2d) 631.
[2]  State ex rel. Wisconsin Bridge & Iron Co. v. Sullivan (1944), 245 Wis. 544, 550, 15 N. W. (2d) 847; Gratz v. Parker (1908), 137 Wis. 104, 106, 118 N. W. 637.
[3]  27 C. J. S., Dismissal and Nonsuit, p. 403, sec. 56.
