Only a partial answer: I think this should be possible using ActiveX
controls; the Knowledgebase includes <A
small example</A> that returns the number of rows and columns. The
attached to that example is much more elaborate than shown in the
Knowledgebase document; you can probably "extrapolate" from that.