1

I have been searching a way to export data to xls/csv/pdf and found many threads talking about this topic:

However, none of these methods support styling data; text color, background color, regular/bold/italic, etc. For example, I wanted to style a header row background of a xls file to be gray. Moreover, most of them don't support in Safari/IE9.

Is there any library for exporting these types of data, which support styling data and also support all modern browsers?

Community
  • 1
  • 1
lvarayut
  • 13,963
  • 17
  • 63
  • 87

2 Answers2

0

For styling you need to use other available API's/.jar files

  1. Apache POI for Excel
  2. IText for PDF

I doubt if any JS file provide support for designing Excel and PDF.

Jawa
  • 2,336
  • 6
  • 34
  • 39
Deepak
  • 1
0

You should take a look at the Microsoft Office XML Formats here (https://en.wikipedia.org/wiki/Microsoft_Office_XML_formats)

You can construct a variable with the xml tags, then output it as XLSX.

nonion
  • 826
  • 2
  • 9
  • 18