简体   繁体   English

is it possible to download MySQL data to excel sheet using PHP and that excel sheet having excel formula of each column

[英]is it possible to download MySQL data to excel sheet using PHP and that excel sheet having excel formula of each column

截图-2021-01-29-194446.png

When we download google sheet it will be downloading with data along with it's formulas.当我们下载谷歌表格时,它将连同数据一起下载它的公式。

My requirement is to download data from mysql database to excel sheet.我的要求是将数据从 mysql 数据库下载到 excel 表。 My data is coming but how I will embed foromula's in that columns.我的数据即将到来,但我将如何在这些列中嵌入公式。 I am using PHP.我正在使用 PHP。

Basic odbc connection will do this, no code required besides sql.基本的 odbc 连接将执行此操作,除了 sql 之外不需要任何代码。

The result is a [excel table] and you can add new columns with formula and adjust colum sort and table sort结果是 [excel 表格],您可以使用公式添加新列并调整列排序和表格排序

You can manually refresh on demand and optionally have query run when the file opens您可以按需手动刷新,也可以选择在文件打开时运行查询

There are many ways to do this ( I prefer the legacy method ) here: https://www.devart.com/odbc/mysql/docs/excel.htm有很多方法可以做到这一点(我更喜欢传统方法): https://www.devart.com/odbc/mysql/docs/excel.htm

BTW, you can run any ad hoc sql via this method including insert, update, create table, stored proc, truncate, etc顺便说一句,您可以通过此方法运行任何临时 sql,包括插入、更新、创建表、存储过程、截断等

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

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