I have a table (in MySQL) with 3 columns:

```
Location Category Supplier
A Computers Company X
A Printers Company Y
B Computers Company X
B Printers Company Y
B Software Company Y
C Computers Company Y
C Software Company Z
```

Now I need to make a matrix containing the above information , like this :

```
Computers Printers Software
A Company X Company Y
B Company X Company Y Company Y
C Company Y Company Z
```

Eventually I need to have this in Excel.

In reality I have a variable number of categories, so doing it in MySQL with a join for each column is not a good option. I could write a function in PHP, but I was wondering if there's a more elegant solution.

I looked a pivot tables in Excel, but they seem only suited for numbers as values. But maybe I'm overlooking something, since I never work with Excel myself.

Any idea's?