Horizontal table with pgfplotstable

How can I make table in pgfplotstable table form input file

A  B
1.0 20
1.1 21
1.2 22
1.3 23
1.4 24


looks like this one:

I trying to use \pgfplotstabletranspose\loadedtable{input.dat} \pgfplotstabletypeset\loadedtable, but column names (A & B) parsing as floats (and gives error). And colnames counting starts from 0 (I need from 1).

And also is it posible to break (hyphenate) large horizontal tables?

-
Please add a minimal working example (MWE) that illustrates your problem. (Snippets tend to be much harder to answer.) –  Joseph Wright Jul 2 '11 at 6:18
Sorry, next time I add –  Molurd Jul 2 '11 at 13:53

The error for the A and B column comes from the fact that pgfplotstables expects numerical data unless specified otherwise. To make the column handle strings, you have to set columns/colnames/.style={string type}.

To get the index to start at one, I would suggest to create a new column on the fly and using this for the column names with the key colnames from=<name>.

Here's an MWE:

\documentclass{article}

\usepackage{pgfplotstable}
\usepackage{filecontents}

\begin{filecontents}{testdata.dat}
A  B
1.0 20
1.1 21
1.2 22
1.3 23
1.4 24
\end{filecontents}

\begin{document}

\pgfplotstableset{
create on use/index/.style={%
create col/assign/.code={%
\pgfmathtruncatemacro\entry{\pgfplotstablerow+1}%
\pgfkeyslet{/pgfplots/table/create col/next content}{\entry}
}
}
}