diff --git a/lib/embulk/input/google_spreadsheets/pager.rb b/lib/embulk/input/google_spreadsheets/pager.rb index 3a0eed5..fe462c0 100644 --- a/lib/embulk/input/google_spreadsheets/pager.rb +++ b/lib/embulk/input/google_spreadsheets/pager.rb @@ -67,6 +67,10 @@ def validate! def max_accessible_row_num(client) sheets_max = client.worksheet_max_row_num + if start_row > sheets_max + raise ConfigError.new("`embulk-input-google_spreadsheets`: start_row `#{start_row}` is larger than spreadsheets max row `#{sheets_max}`") + end + if end_row > sheets_max raise ConfigError.new("`embulk-input-google_spreadsheets`: end_row `#{end_row}` is larger than spreadsheets max row `#{sheets_max}`") end