Citing ?write.table, section CSV files:
By default there is no column name for
a column of row names. Ifcol.names =and
NArow.names = TRUEa blank
column name is added, which is the
convention used for CSV files to be
read by spreadsheets.
So you must do
write.table(a, 'a.txt', col.names=NA)
and you get
"" "A" "B" "C"
"A" 1 4 7
"B" 2 5 8
"C" 3 6 9