are you building a weighted directed or undirected graph? if undirected you need to format your excel file to have two columns the title of the frst one is source and the second one is target. save it in csv format. Open import options in gephi, chosse import and next next .....
I might be wrong, but I don't think Gephi will directly import a matrix. It imports edge and node (attribute) files. As Mohammad says, your edge file needs to have two columns with the headings "source" and target (whether it is directed or not). You can also then include other columns of data relevant to the edge, like "strength", but you still need a separate nodes file. In the nodes file make the first column heading "nodes". Then you can include whatever attribute data you want.
What I have done, to get matrix data into edge and attribute files, is to load the matrix into a program that does upload matrices, such as NodeXL, and then output (or just copy and paste) the node (NodeXL calls it "vertex") data and edge data to separate files.
I think currently gephi (v.0.9) can not import csv matrix. I would appreciate if you can advise on a mac user friendly package that can transform the matrix into rows.