Rather than setSelectedTab() have you tried using the setActiveSheet() method. Just reading the javadoc for the setSelectedTabe() method and it says this;
"Selects a single sheet. This may be different to the 'active' sheet (which is the sheet with focus). " and setActveSheet() says this; "Convenience method to set the active sheet. The active sheet is is the sheet which is currently displayed when the workbook is viewed in Excel. 'Selected' sheet(s) is a distinct concept. " which implies that setActiveSheet() is the method you want to use I think. Yours Mark B -- View this message in context: http://apache-poi.1045710.n5.nabble.com/have-a-workbook-with-4-sheets-Can-not-set-selected-sheet-to-the-first-sheet-tp5710295p5710298.html Sent from the POI - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
