emilianozublena/sheetsu-php

Change Active Sheet does not work

Closed this issue · 5 comments

Hello,

I've tried read data from the second worksheet:

<?php

require('vendor/autoload.php');
use Sheetsu\Sheetsu;

$sheetsu = new Sheetsu([
    'sheetId' => 'SHEET_ID'
]);

$response = $sheetsu->sheet('Sheet2')->read();
$collection = $response->getCollection();

echo $collection->_prepareCollectionToJson();

?>

I've got an empty collection, but I have data in my worksheet 'Sheet2'. Could you tell me what I'm doing wrong?

Did you var dump'ed the $response to see what cURL is bringing?

If you can copy here what $response has in that situation it could bring light to this issue ;)

Thanks for quick response 😃 Now I see what is wrong, there are missing slash in url "https://sheetsu.com/apis/v1.0/020b2c0fsheets/Sheet1"

Hey, I've create PR with fix #5

Great i'll check it out and merge it as soon as possible 👍

Checked and merged, thanks for collaborating!