• Resolved lbordas

    (@lbordas)


    Hi.

    I’m trying to use the first four rows of a Google spreadsheet as headers for diferent languages, as the rest of the rows will be the same for all languages. I’m using the first column to put the corresponding language (only for the rows which will be headers) like en, ca, es, fr.

    A query like: “select B, C, D where A = ‘ca’ or A is null” returns the thead first row containing not only the titles in ca language, but the contents of all four rows. Each th of this first row contains the corresponding title in all four languages, separated by a space. The rest of the rows are displayed properly.

    Is there a way to conditionally choose one of the first rows to act as a header, excluding the others?

    Thanks!

    https://wordpress.org/plugins/inline-google-spreadsheet-viewer/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Meitar

    (@meitar)

    Hm. That’s a bit complex. If I understand correctly, you are probably better splitting off your Sheet into several different Sheets, each dedicated to a single language. Then you can use a dedicated [gdoc] shortcode per language, and that will also let you take advantage of the lang attribute, which will let you localize the DataTables enhancements, too.

    Thread Starter lbordas

    (@lbordas)

    I’m using additional sheets for each language, changing the header rows and referencing the original data range which is in the first one.

    It seems that, for some reason, if the first rows don’t follow the rest of the sheet’s row ‘pattern’ (like the format or something like that), those first rows are all taken as the header… if you try with this test sheet you’ll see what I mean: https://docs.google.com/spreadsheets/d/1mfLADwTC20AZcf0cK_d7XwwigROFLyjslT0B1FgqLuM/edit?usp=sharing

    … I could probably achieve the desired result with the DataTables API… I’m just curious.

    In any case, thanks for your time and the great plugin 🙂

    Plugin Author Meitar

    (@meitar)

    Hm, I’m not clear on what you’re trying to do or what the problem you’re running into is. Glad you got it working with the DataTables API, though. If there’s a bug you want to report, please read “How to write a good bug report” and then send me such a report by posting it here or on GitHub. Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Select one of first rows to act as thead’ is closed to new replies.