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.
Jump to Postthe simplest way is to use
fwrite()
and give the data with awhile()
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 …
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.