Hello everyone! How do you write a PHP function in codeigniter that lets user download data to an Excel file?
Thank You.
Hello everyone! How do you write a PHP function in codeigniter that lets user download data to an Excel file?
Thank You.
the simplest way is to use fwrite()
and give the data with a while()
and save the filename with *.xls.
Pay attention to the end of each line to break it wit \t\n
, this will separate the lines by tab. Or you can separate each field with \t
and save it to *.xls.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.