def _range2cols(areas):
cols = []<EOL>for rng in areas.split("<STR_LIT:U+002C>"):<EOL><INDENT>if "<STR_LIT::>" in rng:<EOL><INDENT>rng = rng.split("<STR_LIT::>")<EOL>cols.extend(lrange(_excel2num(rng[<NUM_LIT:0>]), _excel2num(rng[<NUM_LIT:1>]) + <NUM_LIT:1>))<EOL><DEDENT>else:<EOL><INDENT>cols.append(_excel2num(rng))<EOL><DEDENT><DEDENT>return cols<EOL>
Convert comma separated list of column names and ranges to indices.

Parameters
----------
areas : str
    A string containing a sequence of column ranges (or areas).

Returns
-------
cols : list
    A list of 0-based column indices.

Examples
--------
>>> _range2cols('A:E')
[0, 1, 2, 3, 4]
>>> _range2cols('A,C,Z:AB')
[0, 2, 25, 26, 27]