fix index default sheet Bagan 2025 on spreadsheet
This commit is contained in:
@@ -263,7 +263,7 @@ class ServiceGoogleSheet
|
|||||||
$result = [];
|
$result = [];
|
||||||
|
|
||||||
foreach ($sections as $key => $identifier) {
|
foreach ($sections as $key => $identifier) {
|
||||||
$values = $this->get_values_from_section($identifier, [10, 11], 2);
|
$values = $this->get_values_from_section($identifier, [10, 11], 8);
|
||||||
|
|
||||||
if (!empty($values)) {
|
if (!empty($values)) {
|
||||||
$result[$key] = [
|
$result[$key] = [
|
||||||
@@ -395,7 +395,7 @@ class ServiceGoogleSheet
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function get_data_by_sheet($no_sheet = 1){
|
private function get_data_by_sheet($no_sheet = 8){
|
||||||
$spreadsheet = $this->service->spreadsheets->get($this->spreadsheetID);
|
$spreadsheet = $this->service->spreadsheets->get($this->spreadsheetID);
|
||||||
$sheets = $spreadsheet->getSheets();
|
$sheets = $spreadsheet->getSheets();
|
||||||
$sheetTitle = $sheets[$no_sheet]->getProperties()->getTitle();
|
$sheetTitle = $sheets[$no_sheet]->getProperties()->getTitle();
|
||||||
@@ -412,7 +412,7 @@ class ServiceGoogleSheet
|
|||||||
* @param int $no_sheet Sheet number (0-based)
|
* @param int $no_sheet Sheet number (0-based)
|
||||||
* @return array Array of values from specified columns, or empty array if section not found
|
* @return array Array of values from specified columns, or empty array if section not found
|
||||||
*/
|
*/
|
||||||
private function get_values_from_section(string $section_identifier, array $column_indices = [], int $no_sheet = 1) {
|
private function get_values_from_section(string $section_identifier, array $column_indices = [], int $no_sheet = 8) {
|
||||||
try {
|
try {
|
||||||
$sheet_data = $this->get_data_by_sheet($no_sheet);
|
$sheet_data = $this->get_data_by_sheet($no_sheet);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user