I can't understand the code below , what's the deference between "getByIndex( 0 )" and "*getByName( OUString::createFromAscii("Sheet2")); *";
"XSpreadsheetDocument " and "XSpreadsheets "; why I need use Reference< XSpreadsheets > twice ? //query for a XSpreadsheetDocument interface Reference< XSpreadsheetDocument > rSheetDoc (xComponent, UNO_QUERY); //use it to get the XSpreadsheets interface Reference< XSpreadsheets > rSheets = rSheetDoc->getSheets(); //query for the XIndexAccess interface Reference< XIndexAccess > xSheetsIA (rSheets, UNO_QUERY); Any sheet = xSheetsIA->getByIndex( 0 ); Reference< XSpreadsheet > rSpSheet (sheet, UNO_QUERY); -- 作智慧的减法 ... 体会生活的微妙的富足 ... 嗯 ...