Pular para o conteúdo principal

Filtrar dados

O Sheet Best permite filtrar linhas diretamente pela URL usando valores exatos e curingas (*). Para comparar números ou datas (>, <, >=, <=), veja o guia de consultas.

Filtrar por uma coluna

Acrescente /<Column Name>/<Value> à URL da planilha.

# Exact match
curl 'https://api.sheetbest.com/sheets/YOUR_SHEET_ID/Name/Jane Doe'

# Contains "John"
curl 'https://api.sheetbest.com/sheets/YOUR_SHEET_ID/Name/*John*'

# Starts with "Jane"
curl 'https://api.sheetbest.com/sheets/YOUR_SHEET_ID/Name/Jane*'

# Ends with "Jane"
curl 'https://api.sheetbest.com/sheets/YOUR_SHEET_ID/Name/*Jane'

Resumo dos curingas

PadrãoCorrespondência
JaneValor exato Jane
*Jane*Qualquer valor que contenha Jane
Jane*Começa com Jane
*JaneTermina com Jane

Filtrar várias colunas

Use o endpoint /search e passe cada coluna como parâmetro de consulta. Os curingas também funcionam aqui.

# Rows where Name contains "John" AND Age = 56
curl 'https://api.sheetbest.com/sheets/YOUR_SHEET_ID/search?Name=*John*&Age=56'

Adicione search_ci=true para que as correspondências não diferenciem maiúsculas e minúsculas.

curl 'https://api.sheetbest.com/sheets/YOUR_SHEET_ID/Name/*jane*?search_ci=true'
curl 'https://api.sheetbest.com/sheets/YOUR_SHEET_ID/search?Name=*JOHN*&search_ci=true'

Combinar com abas

Os filtros funcionam em qualquer aba. Coloque /tabs/<Tab Name> antes do sufixo do filtro. Veja o guia de abas para saber mais.

# Single column on the "Admin" tab
curl 'https://api.sheetbest.com/sheets/YOUR_SHEET_ID/tabs/Admin/Name/*Arthur*'

# Multiple columns on the "Admin" tab
curl 'https://api.sheetbest.com/sheets/YOUR_SHEET_ID/tabs/Admin/search?Age=21&Name=*Mick*'

Próximos passos