0

I'm currently working on automize some work processes. An Excel File (*.xlsx) should be written. Normally people do this by hand. Now I want to do this with PHP-code. I'm using PHPSpreadsheet. I started put in general table structure and now wanted add some style to it. But it's complicated and takes a lot time to style each cell or a bunch of cells. So I thought of copy the basic worksheet style. But I stuck by how to do this. Is there ANY way to get this style from specific cells or a bunch of cells and "echo" or "print_r" it as PHP-code?

Thanks for your answers!

Greetings Julian

J. Kreller
  • 150
  • 1
  • 10
  • Welcome to SO, when you ask a question like this you need to accompany it with the appropriate code so the community can have look and help you with or even to give a suggestion on what to do or where to look. – S4NDM4N Oct 17 '17 at 08:39
  • Have you looked at PHPSpreadsheet's HTML Writer if you want to see how to convert spreadsheet styling to HTMP Markup that can be viewed in a browser.... otherwise how do you want style information to be echoed or printed? – Mark Baker Oct 17 '17 at 08:51
  • PS. The way to get style information for a cell or group of cells is using the worksheet object's `getStyle()` method, with the cell address or cell range as an argument – Mark Baker Oct 17 '17 at 08:53

0 Answers0