pgfplotstable: Have every other row be a multicolumn











up vote
0
down vote

favorite












I am trying to make a table using pgfplotstable, and am having difficulties because the csv's are jagged. Most rows have 4 columns, as do the headers, but some rows are only 1 column and I would like these 1-cell rows to span the width of the table.



How do I either have pgfplotstable dynamically create multicolumns depending on the csv, or set every other row to be a multicolumn using data from the csv?



mwe (does not produce the proper layout):



documentclass{article}
usepackage{pgfplotstable,multirow,booktabs}

begin{filecontents}{data.csv}
ColumnHeader1, ColumnHeader2, ColumnHeader3, ColumnHeader4
item1, string1, string2, string3
some-text-goes-here
item2, string1, string2, string3
some-more-text-goes-here
end{filecontents}

begin{document}

pgfplotstabletypeset[
col sep = comma,
column type = l,
string type,
multicolumn names,
every head row/.style={before row=toprule, after row=midrule},
every last row/.style={after row=bottomrule},
%every other row/.style = {multicolumn{4}{l}{...}}
]{data.csv}

end{document}









share|improve this question




















  • 1




    Welcome to TeX.SX! Please add a minimal working example (MWE), not not just a fragment. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with documentclass and ending with end{document}
    – albert
    Aug 27 at 17:51















up vote
0
down vote

favorite












I am trying to make a table using pgfplotstable, and am having difficulties because the csv's are jagged. Most rows have 4 columns, as do the headers, but some rows are only 1 column and I would like these 1-cell rows to span the width of the table.



How do I either have pgfplotstable dynamically create multicolumns depending on the csv, or set every other row to be a multicolumn using data from the csv?



mwe (does not produce the proper layout):



documentclass{article}
usepackage{pgfplotstable,multirow,booktabs}

begin{filecontents}{data.csv}
ColumnHeader1, ColumnHeader2, ColumnHeader3, ColumnHeader4
item1, string1, string2, string3
some-text-goes-here
item2, string1, string2, string3
some-more-text-goes-here
end{filecontents}

begin{document}

pgfplotstabletypeset[
col sep = comma,
column type = l,
string type,
multicolumn names,
every head row/.style={before row=toprule, after row=midrule},
every last row/.style={after row=bottomrule},
%every other row/.style = {multicolumn{4}{l}{...}}
]{data.csv}

end{document}









share|improve this question




















  • 1




    Welcome to TeX.SX! Please add a minimal working example (MWE), not not just a fragment. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with documentclass and ending with end{document}
    – albert
    Aug 27 at 17:51













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am trying to make a table using pgfplotstable, and am having difficulties because the csv's are jagged. Most rows have 4 columns, as do the headers, but some rows are only 1 column and I would like these 1-cell rows to span the width of the table.



How do I either have pgfplotstable dynamically create multicolumns depending on the csv, or set every other row to be a multicolumn using data from the csv?



mwe (does not produce the proper layout):



documentclass{article}
usepackage{pgfplotstable,multirow,booktabs}

begin{filecontents}{data.csv}
ColumnHeader1, ColumnHeader2, ColumnHeader3, ColumnHeader4
item1, string1, string2, string3
some-text-goes-here
item2, string1, string2, string3
some-more-text-goes-here
end{filecontents}

begin{document}

pgfplotstabletypeset[
col sep = comma,
column type = l,
string type,
multicolumn names,
every head row/.style={before row=toprule, after row=midrule},
every last row/.style={after row=bottomrule},
%every other row/.style = {multicolumn{4}{l}{...}}
]{data.csv}

end{document}









share|improve this question















I am trying to make a table using pgfplotstable, and am having difficulties because the csv's are jagged. Most rows have 4 columns, as do the headers, but some rows are only 1 column and I would like these 1-cell rows to span the width of the table.



How do I either have pgfplotstable dynamically create multicolumns depending on the csv, or set every other row to be a multicolumn using data from the csv?



mwe (does not produce the proper layout):



documentclass{article}
usepackage{pgfplotstable,multirow,booktabs}

begin{filecontents}{data.csv}
ColumnHeader1, ColumnHeader2, ColumnHeader3, ColumnHeader4
item1, string1, string2, string3
some-text-goes-here
item2, string1, string2, string3
some-more-text-goes-here
end{filecontents}

begin{document}

pgfplotstabletypeset[
col sep = comma,
column type = l,
string type,
multicolumn names,
every head row/.style={before row=toprule, after row=midrule},
every last row/.style={after row=bottomrule},
%every other row/.style = {multicolumn{4}{l}{...}}
]{data.csv}

end{document}






pgfplotstable multicolumn






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 27 at 20:04

























asked Aug 27 at 17:33









KeBr

12




12








  • 1




    Welcome to TeX.SX! Please add a minimal working example (MWE), not not just a fragment. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with documentclass and ending with end{document}
    – albert
    Aug 27 at 17:51














  • 1




    Welcome to TeX.SX! Please add a minimal working example (MWE), not not just a fragment. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with documentclass and ending with end{document}
    – albert
    Aug 27 at 17:51








1




1




Welcome to TeX.SX! Please add a minimal working example (MWE), not not just a fragment. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with documentclass and ending with end{document}
– albert
Aug 27 at 17:51




Welcome to TeX.SX! Please add a minimal working example (MWE), not not just a fragment. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with documentclass and ending with end{document}
– albert
Aug 27 at 17:51










1 Answer
1






active

oldest

votes

















up vote
0
down vote













If you want to have multicolumns by default, with the exception of the head row and possibly other exceptions, you can hack "typeset cell" from the columns.



The default is:



ifnumpgfplotstablecol=pgfplotstablecols%
pgfkeyssetvalue{/pgfplots/table/@cell content}{#1\}%
else%
pgfkeyssetvalue{/pgfplots/table/@cell content}{#1 &}%
fi%


And you make it out of it:



pgfplotstableset{
typeset cell/.code={%%
ifnumpgfplotstablerow=-1% Head Row (Exception)
ifnumpgfplotstablecol=pgfplotstablecols%
pgfkeyssetvalue{/pgfplots/table/@cell content}{#1\}%
else%
pgfkeyssetvalue{/pgfplots/table/@cell content}{#1 &}%
fi%
else
ifnumpgfplotstablerow=2% Another Exception Row ...
ifnumpgfplotstablecol=pgfplotstablecols%
pgfkeyssetvalue{/pgfplots/table/@cell content}{#1\}%
else%
pgfkeyssetvalue{/pgfplots/table/@cell content}{#1 &}%
fi%
else%
ifnumpgfplotstablecol=pgfplotstablecols% Standard
pgfkeyssetvalue{/pgfplots/table/@cell content}{\}%
else%
ifnumpgfplotstablecol=1%
pgfkeyssetvalue{/pgfplots/table/@cell content}{multicolumn{4}{c}{#1}}%
else%
pgfkeyssetvalue{/pgfplots/table/@cell content}{}%
fifififi%
},%%
}


enter image description here



MWE:



documentclass[margin=5pt,]{standalone}
%documentclass{article}
usepackage{pgfplotstable,booktabs, filecontents}
pgfplotsset{compat=1.12}

begin{filecontents*}{jobname-data.csv}
A,B,C,D
Some Text goes here in a multicolum., , ,
string1 (bad), string2, string3, string4
string1 (good), string2, string3, string4
Some more Text goes here in a multicolum., , ,
Some Text goes here in a multicolum., , ,
end{filecontents*}

pgfplotstableset{
typeset cell/.code={%%
ifnumpgfplotstablerow=-1% Head Row (Exception)
ifnumpgfplotstablecol=pgfplotstablecols%
pgfkeyssetvalue{/pgfplots/table/@cell content}{#1\}%
else%
pgfkeyssetvalue{/pgfplots/table/@cell content}{#1 &}%
fi%
else
ifnumpgfplotstablerow=2% Another Exception Row ...
ifnumpgfplotstablecol=pgfplotstablecols%
pgfkeyssetvalue{/pgfplots/table/@cell content}{#1\}%
else%
pgfkeyssetvalue{/pgfplots/table/@cell content}{#1 &}%
fi%
else%
ifnumpgfplotstablecol=pgfplotstablecols% Standard
pgfkeyssetvalue{/pgfplots/table/@cell content}{\}%
else%
ifnumpgfplotstablecol=1%
pgfkeyssetvalue{/pgfplots/table/@cell content}{multicolumn{4}{c}{#1}}%
else%
pgfkeyssetvalue{/pgfplots/table/@cell content}{}%
fifififi%
},%%
}

begin{document}
pgfplotstabletypeset[col sep = comma,
string type,
column type = l,
multicolumn names,
every head row/.style={before row=toprule, after row=midrule},
every last row/.style={after row=bottomrule},
]{jobname-data.csv}
end{document}





share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "85"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f448037%2fpgfplotstable-have-every-other-row-be-a-multicolumn%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    If you want to have multicolumns by default, with the exception of the head row and possibly other exceptions, you can hack "typeset cell" from the columns.



    The default is:



    ifnumpgfplotstablecol=pgfplotstablecols%
    pgfkeyssetvalue{/pgfplots/table/@cell content}{#1\}%
    else%
    pgfkeyssetvalue{/pgfplots/table/@cell content}{#1 &}%
    fi%


    And you make it out of it:



    pgfplotstableset{
    typeset cell/.code={%%
    ifnumpgfplotstablerow=-1% Head Row (Exception)
    ifnumpgfplotstablecol=pgfplotstablecols%
    pgfkeyssetvalue{/pgfplots/table/@cell content}{#1\}%
    else%
    pgfkeyssetvalue{/pgfplots/table/@cell content}{#1 &}%
    fi%
    else
    ifnumpgfplotstablerow=2% Another Exception Row ...
    ifnumpgfplotstablecol=pgfplotstablecols%
    pgfkeyssetvalue{/pgfplots/table/@cell content}{#1\}%
    else%
    pgfkeyssetvalue{/pgfplots/table/@cell content}{#1 &}%
    fi%
    else%
    ifnumpgfplotstablecol=pgfplotstablecols% Standard
    pgfkeyssetvalue{/pgfplots/table/@cell content}{\}%
    else%
    ifnumpgfplotstablecol=1%
    pgfkeyssetvalue{/pgfplots/table/@cell content}{multicolumn{4}{c}{#1}}%
    else%
    pgfkeyssetvalue{/pgfplots/table/@cell content}{}%
    fifififi%
    },%%
    }


    enter image description here



    MWE:



    documentclass[margin=5pt,]{standalone}
    %documentclass{article}
    usepackage{pgfplotstable,booktabs, filecontents}
    pgfplotsset{compat=1.12}

    begin{filecontents*}{jobname-data.csv}
    A,B,C,D
    Some Text goes here in a multicolum., , ,
    string1 (bad), string2, string3, string4
    string1 (good), string2, string3, string4
    Some more Text goes here in a multicolum., , ,
    Some Text goes here in a multicolum., , ,
    end{filecontents*}

    pgfplotstableset{
    typeset cell/.code={%%
    ifnumpgfplotstablerow=-1% Head Row (Exception)
    ifnumpgfplotstablecol=pgfplotstablecols%
    pgfkeyssetvalue{/pgfplots/table/@cell content}{#1\}%
    else%
    pgfkeyssetvalue{/pgfplots/table/@cell content}{#1 &}%
    fi%
    else
    ifnumpgfplotstablerow=2% Another Exception Row ...
    ifnumpgfplotstablecol=pgfplotstablecols%
    pgfkeyssetvalue{/pgfplots/table/@cell content}{#1\}%
    else%
    pgfkeyssetvalue{/pgfplots/table/@cell content}{#1 &}%
    fi%
    else%
    ifnumpgfplotstablecol=pgfplotstablecols% Standard
    pgfkeyssetvalue{/pgfplots/table/@cell content}{\}%
    else%
    ifnumpgfplotstablecol=1%
    pgfkeyssetvalue{/pgfplots/table/@cell content}{multicolumn{4}{c}{#1}}%
    else%
    pgfkeyssetvalue{/pgfplots/table/@cell content}{}%
    fifififi%
    },%%
    }

    begin{document}
    pgfplotstabletypeset[col sep = comma,
    string type,
    column type = l,
    multicolumn names,
    every head row/.style={before row=toprule, after row=midrule},
    every last row/.style={after row=bottomrule},
    ]{jobname-data.csv}
    end{document}





    share|improve this answer

























      up vote
      0
      down vote













      If you want to have multicolumns by default, with the exception of the head row and possibly other exceptions, you can hack "typeset cell" from the columns.



      The default is:



      ifnumpgfplotstablecol=pgfplotstablecols%
      pgfkeyssetvalue{/pgfplots/table/@cell content}{#1\}%
      else%
      pgfkeyssetvalue{/pgfplots/table/@cell content}{#1 &}%
      fi%


      And you make it out of it:



      pgfplotstableset{
      typeset cell/.code={%%
      ifnumpgfplotstablerow=-1% Head Row (Exception)
      ifnumpgfplotstablecol=pgfplotstablecols%
      pgfkeyssetvalue{/pgfplots/table/@cell content}{#1\}%
      else%
      pgfkeyssetvalue{/pgfplots/table/@cell content}{#1 &}%
      fi%
      else
      ifnumpgfplotstablerow=2% Another Exception Row ...
      ifnumpgfplotstablecol=pgfplotstablecols%
      pgfkeyssetvalue{/pgfplots/table/@cell content}{#1\}%
      else%
      pgfkeyssetvalue{/pgfplots/table/@cell content}{#1 &}%
      fi%
      else%
      ifnumpgfplotstablecol=pgfplotstablecols% Standard
      pgfkeyssetvalue{/pgfplots/table/@cell content}{\}%
      else%
      ifnumpgfplotstablecol=1%
      pgfkeyssetvalue{/pgfplots/table/@cell content}{multicolumn{4}{c}{#1}}%
      else%
      pgfkeyssetvalue{/pgfplots/table/@cell content}{}%
      fifififi%
      },%%
      }


      enter image description here



      MWE:



      documentclass[margin=5pt,]{standalone}
      %documentclass{article}
      usepackage{pgfplotstable,booktabs, filecontents}
      pgfplotsset{compat=1.12}

      begin{filecontents*}{jobname-data.csv}
      A,B,C,D
      Some Text goes here in a multicolum., , ,
      string1 (bad), string2, string3, string4
      string1 (good), string2, string3, string4
      Some more Text goes here in a multicolum., , ,
      Some Text goes here in a multicolum., , ,
      end{filecontents*}

      pgfplotstableset{
      typeset cell/.code={%%
      ifnumpgfplotstablerow=-1% Head Row (Exception)
      ifnumpgfplotstablecol=pgfplotstablecols%
      pgfkeyssetvalue{/pgfplots/table/@cell content}{#1\}%
      else%
      pgfkeyssetvalue{/pgfplots/table/@cell content}{#1 &}%
      fi%
      else
      ifnumpgfplotstablerow=2% Another Exception Row ...
      ifnumpgfplotstablecol=pgfplotstablecols%
      pgfkeyssetvalue{/pgfplots/table/@cell content}{#1\}%
      else%
      pgfkeyssetvalue{/pgfplots/table/@cell content}{#1 &}%
      fi%
      else%
      ifnumpgfplotstablecol=pgfplotstablecols% Standard
      pgfkeyssetvalue{/pgfplots/table/@cell content}{\}%
      else%
      ifnumpgfplotstablecol=1%
      pgfkeyssetvalue{/pgfplots/table/@cell content}{multicolumn{4}{c}{#1}}%
      else%
      pgfkeyssetvalue{/pgfplots/table/@cell content}{}%
      fifififi%
      },%%
      }

      begin{document}
      pgfplotstabletypeset[col sep = comma,
      string type,
      column type = l,
      multicolumn names,
      every head row/.style={before row=toprule, after row=midrule},
      every last row/.style={after row=bottomrule},
      ]{jobname-data.csv}
      end{document}





      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        If you want to have multicolumns by default, with the exception of the head row and possibly other exceptions, you can hack "typeset cell" from the columns.



        The default is:



        ifnumpgfplotstablecol=pgfplotstablecols%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{#1\}%
        else%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{#1 &}%
        fi%


        And you make it out of it:



        pgfplotstableset{
        typeset cell/.code={%%
        ifnumpgfplotstablerow=-1% Head Row (Exception)
        ifnumpgfplotstablecol=pgfplotstablecols%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{#1\}%
        else%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{#1 &}%
        fi%
        else
        ifnumpgfplotstablerow=2% Another Exception Row ...
        ifnumpgfplotstablecol=pgfplotstablecols%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{#1\}%
        else%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{#1 &}%
        fi%
        else%
        ifnumpgfplotstablecol=pgfplotstablecols% Standard
        pgfkeyssetvalue{/pgfplots/table/@cell content}{\}%
        else%
        ifnumpgfplotstablecol=1%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{multicolumn{4}{c}{#1}}%
        else%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{}%
        fifififi%
        },%%
        }


        enter image description here



        MWE:



        documentclass[margin=5pt,]{standalone}
        %documentclass{article}
        usepackage{pgfplotstable,booktabs, filecontents}
        pgfplotsset{compat=1.12}

        begin{filecontents*}{jobname-data.csv}
        A,B,C,D
        Some Text goes here in a multicolum., , ,
        string1 (bad), string2, string3, string4
        string1 (good), string2, string3, string4
        Some more Text goes here in a multicolum., , ,
        Some Text goes here in a multicolum., , ,
        end{filecontents*}

        pgfplotstableset{
        typeset cell/.code={%%
        ifnumpgfplotstablerow=-1% Head Row (Exception)
        ifnumpgfplotstablecol=pgfplotstablecols%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{#1\}%
        else%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{#1 &}%
        fi%
        else
        ifnumpgfplotstablerow=2% Another Exception Row ...
        ifnumpgfplotstablecol=pgfplotstablecols%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{#1\}%
        else%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{#1 &}%
        fi%
        else%
        ifnumpgfplotstablecol=pgfplotstablecols% Standard
        pgfkeyssetvalue{/pgfplots/table/@cell content}{\}%
        else%
        ifnumpgfplotstablecol=1%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{multicolumn{4}{c}{#1}}%
        else%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{}%
        fifififi%
        },%%
        }

        begin{document}
        pgfplotstabletypeset[col sep = comma,
        string type,
        column type = l,
        multicolumn names,
        every head row/.style={before row=toprule, after row=midrule},
        every last row/.style={after row=bottomrule},
        ]{jobname-data.csv}
        end{document}





        share|improve this answer












        If you want to have multicolumns by default, with the exception of the head row and possibly other exceptions, you can hack "typeset cell" from the columns.



        The default is:



        ifnumpgfplotstablecol=pgfplotstablecols%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{#1\}%
        else%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{#1 &}%
        fi%


        And you make it out of it:



        pgfplotstableset{
        typeset cell/.code={%%
        ifnumpgfplotstablerow=-1% Head Row (Exception)
        ifnumpgfplotstablecol=pgfplotstablecols%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{#1\}%
        else%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{#1 &}%
        fi%
        else
        ifnumpgfplotstablerow=2% Another Exception Row ...
        ifnumpgfplotstablecol=pgfplotstablecols%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{#1\}%
        else%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{#1 &}%
        fi%
        else%
        ifnumpgfplotstablecol=pgfplotstablecols% Standard
        pgfkeyssetvalue{/pgfplots/table/@cell content}{\}%
        else%
        ifnumpgfplotstablecol=1%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{multicolumn{4}{c}{#1}}%
        else%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{}%
        fifififi%
        },%%
        }


        enter image description here



        MWE:



        documentclass[margin=5pt,]{standalone}
        %documentclass{article}
        usepackage{pgfplotstable,booktabs, filecontents}
        pgfplotsset{compat=1.12}

        begin{filecontents*}{jobname-data.csv}
        A,B,C,D
        Some Text goes here in a multicolum., , ,
        string1 (bad), string2, string3, string4
        string1 (good), string2, string3, string4
        Some more Text goes here in a multicolum., , ,
        Some Text goes here in a multicolum., , ,
        end{filecontents*}

        pgfplotstableset{
        typeset cell/.code={%%
        ifnumpgfplotstablerow=-1% Head Row (Exception)
        ifnumpgfplotstablecol=pgfplotstablecols%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{#1\}%
        else%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{#1 &}%
        fi%
        else
        ifnumpgfplotstablerow=2% Another Exception Row ...
        ifnumpgfplotstablecol=pgfplotstablecols%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{#1\}%
        else%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{#1 &}%
        fi%
        else%
        ifnumpgfplotstablecol=pgfplotstablecols% Standard
        pgfkeyssetvalue{/pgfplots/table/@cell content}{\}%
        else%
        ifnumpgfplotstablecol=1%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{multicolumn{4}{c}{#1}}%
        else%
        pgfkeyssetvalue{/pgfplots/table/@cell content}{}%
        fifififi%
        },%%
        }

        begin{document}
        pgfplotstabletypeset[col sep = comma,
        string type,
        column type = l,
        multicolumn names,
        every head row/.style={before row=toprule, after row=midrule},
        every last row/.style={after row=bottomrule},
        ]{jobname-data.csv}
        end{document}






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 13 at 20:56









        cis

        607514




        607514






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f448037%2fpgfplotstable-have-every-other-row-be-a-multicolumn%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            mysqli_query(): Empty query in /home/lucindabrummitt/public_html/blog/wp-includes/wp-db.php on line 1924

            How to change which sound is reproduced for terminal bell?

            Can I use Tabulator js library in my java Spring + Thymeleaf project?