I just realized that I also need to clean multiple worksheets in several Origin projects from empty rows. So, I wrote a script that maybe will be useful to somebody with similar needs (as Lars was).
This script cuts off all zero rows. It does not seem to remove empty lines in the middle of the datasets, although I did not do a thorough testing.
doc -e W {
nRows=%H!wks.maxRows;
set %H -er $(nRows);
};
In case you might have an empty worksheet, the following modified script will not break on such a worksheet and will inform you about the name of that empty window, but will not do anything to it.
doc -e W {
nRows=%H!wks.maxRows;
if (nRows > 0) {
set %H -er $(nRows);
};
else {
type (%H worksheet is empty);
};
};
For me, a few projects became 2-3 times smaller.
PS.
Mike, thanks for your earlier response. I just didn't want to waste the traffic for a separate "thank you" note. 