简体   繁体   English

如何使用 SimpleXLSX 从 sql 表中提取所有数据并将其保存在 codeigniter 中的 excel 文件中

[英]How to extract all data from sql table and save it in excel file in codeigniter using SimpleXLSX

I want to get all the data from mysql table and save it in Excel format using SimpleXLSX library and let the user download that excel format.我想从 mysql 表中获取所有数据,并使用 SimpleXLSX 库将其保存为 Excel 格式,并让用户下载 excel 格式。 I have use that library before for importing data from excel file but now i want it for exporting from mysql database to Excel Format.我之前使用该库从 excel 文件导入数据,但现在我希望它从 mysql 数据库导出到 Excel 格式。

If you're using only SimpleXLSX.php - it's impossible.如果您只使用SimpleXLSX.php - 这是不可能的。 example source示例源

If you're using additional files like SimpleXLSXStyle.php, SimpleXLSXWorkbook.php, SimpleXLSXWorksheet.php - you could save it in some directory and then retrieve it(create, save into temp dir, retrieve, delete from temp dir). If you're using additional files like SimpleXLSXStyle.php, SimpleXLSXWorkbook.php, SimpleXLSXWorksheet.php - you could save it in some directory and then retrieve it(create, save into temp dir, retrieve, delete from temp dir). example source示例源

The final answer it's possible or not would be done after researching of the SimpleXLSX library files in your project.在研究项目中的 SimpleXLSX 库文件后,可能会或不会做出最终答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM