File tree Expand file tree Collapse file tree 2 files changed +46
-2
lines changed
Expand file tree Collapse file tree 2 files changed +46
-2
lines changed Original file line number Diff line number Diff line change @@ -55,4 +55,36 @@ public function getSpreadsheetById($id)
5555 )
5656 );
5757 }
58+
59+ /**
60+ * Returns a list feed of the specified worksheet.
61+ *
62+ * @see \Google\Spreadsheet\Worksheet::getWorksheetId()
63+ *
64+ * @param string $worksheetId
65+ *
66+ * @return \Google\Spreadsheet\ListFeed
67+ */
68+ public function getListFeed ($ worksheetId )
69+ {
70+ return new ListFeed (
71+ ServiceRequestFactory::getInstance ()->get ("feeds/list/ {$ worksheetId }/od6/private/full " )
72+ );
73+ }
74+
75+ /**
76+ * Returns a cell feed of the specified worksheet.
77+ *
78+ * @see \Google\Spreadsheet\Worksheet::getWorksheetId()
79+ *
80+ * @param string $worksheetId
81+ *
82+ * @return \Google\Spreadsheet\CellFeed
83+ */
84+ public function getCellFeed ($ worksheetId )
85+ {
86+ return new CellFeed (
87+ ServiceRequestFactory::getInstance ()->get ("feeds/cells/ {$ worksheetId }/od6/private/full " )
88+ );
89+ }
5890}
Original file line number Diff line number Diff line change @@ -37,8 +37,6 @@ class Worksheet
3737
3838 private $ postUrl ;
3939
40- private $ editCellPostUrl ;
41-
4240 /**
4341 * Initializes the worksheet object.
4442 *
@@ -60,6 +58,20 @@ public function getId()
6058 return $ this ->xml ->id ->__toString ();
6159 }
6260
61+ /**
62+ * Get the worksheet id. Extracts the actual string id of the worksheet
63+ * as opposed to the full url as in getId().
64+ *
65+ * @return string
66+ */
67+ public function getWorksheetId ()
68+ {
69+ $ parts = explode ("/ " , $ this ->xml ->id ->__toString ());
70+ if (count ($ parts ) === 9 ) {
71+ return $ parts [5 ];
72+ }
73+ }
74+
6375 /**
6476 * Get the worksheet GID
6577 *
You can’t perform that action at this time.
0 commit comments