Gviz query how do you get numbers and letters bouth from a colum in a list view?

Hi dear commuty,

I have an issue and I don't know how to fix it. I use giviz to get some values from an spreadsheet, in the next image I will show the values.

The issue is:

In the colum H, we have numbers and letters. ex. 98, 5200, no corre & ill

then when I take the values in a list view, let me show you the list view.
image

how can we have all the values of colum H. because we can only see the numbers but not the letters, in the last row we see PushPull, 9, Marca código and , ....... but we can't see tarimas because are letters

I will show the blocks used to extract the information

By chance somebody knws how to fix it to see all the values numbers and letters ?

thanks in advance

What do you get in Web.GotText - responseContent?

Have you checked this @TIMAI2 tutorial?

@Juan_Antonio Hi, yes did.

this is the web got.text

image

image

Put a Label on Web.GotText and see what you get.

llllllddd

The same Issue, we can not see thé letters

with push pull it does not appear the world tarimas

You do not show your query....

sorry, I'll show the URL and the query

https://docs.google.com/spreadsheets/d/1Cu77ER5zL6tieN6jQSpQAP0wtF8PNXvdCe6xmq_rZXc/gviz/tq?tqx=out:csv&tq=SELECT E, F, G, H, I WHERE A = 'Reportado'

you know even when we test this in the browser show this

image

column D only we can see the numbers

It seems to work OK for numbers and text in column F. What is different about column H ?

I am trying to see, but I have not realise

for colum F manualy I chage the format

as text wiout format

but is there a way to do that automatizally for all the row?

Google Sheets will tend to set the format of a cell based upon the content which a puts applies.

You run an apps script to set the format after an entry is made...

Alternatively, you could enter all the numbers as text, by placing an apostrophe before the number:

'1234

TIM,

Is like this the code that I need to introduce in apps script ?

if (Funcion == 'ENVIAR' ) {
var registro = e.parameter.REGISTRO.split(',');
sh.appendRow(registro);
sh.getDataRange().setNumberFormat(String numberFormat)
return ContentService.createTextOutput("New record created");

See here

I suggest, if you cannot set just the cell, then to set the column.

1 Like

thanks

so like this?

if (Funcion == 'ENVIAR' ) {
var registro = e.parameter.REGISTRO.split(',');
sh.appendRow(registro);
var column = sheet.getRange("H2:H");
column.setNumberFormat("@");
return ContentService.createTextOutput("New record created");
}

Try it, see what happens...

ok, I'll do, and then I go back

no, I did and I do not works :frowning:

looks that the code is not running

sh.getRange("H2:H") (not sheet.)

1 Like

thanks TIM, I really apreciate your help, now it works

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.