How to format cells in excel through php?

Asked

Viewed 365 times

0

I have a php code that retrieves data in a database and generates a CSV file.

The client opens this CSV in excel to view the data. So far so good.

The demand of the client is that he wants to open the file in excel and he wants to have also some pre-formatted cells as if it were the header of the document - see example below:

inserir a descrição da imagem aqui

My question is how do we do this? Cell formatting should be contained within the CSV?

1 answer

1


You can simply use html tag inside the fields as an example:

<table>
  <tr>
    <td><h1>Titulo</h1></td>
    <td><strong>Titulo</strong></td>
  </tr>
</table>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.