How to use two factor ANOVA

Hello. I teach statistic to a beginners class and I wish to use LibreOffice calc. (windows 7 + LO Version:

if I try to use >Data>Statistics>Anova selecting Type: Two factor … I found always disabled “grouped by” section and cannot change “Rows per sample”.

Look at this example: I can only generate ANOVA as in Sheet1 (which is wrong) while I would like to have as in Sheet2 (manually worked out by myself). How Can I get the same result by using the built-in function ?

Many thanks

Why was this closed? Is there a solution to this? LibreOffice Calc still you cannot adjust the “rows per sample” in a two factor ANOVA