to check table is transpose or not
BOOL IsTransposed( )
TRUE if already transposed else FALSE.
// Before running, highlight XY columns and do Fit Linear, and keep result sheet is active.
Worksheet wks = Project.ActiveLayer();
gg.Attach(wks, 2); //Note table
gg.SetTranspose( !gg.IsTransposed() );