MySQL:垂直选择 .XLS 输出文件/针对特定单元格
我试图一次从 MySQL 输出一两行到 XLS 电子表格中,但理想情况下我希望它是垂直的,并且我希望在每行旁边包含相同的用户定义数据。
它最终应该看起来像这样:
Name: Bobby
Surname: Robson
Favorite food: Chips
等等。我还理想地希望包括第二组两列。 这可能吗?
I'm trying to output one or two rows at a time from MySQL into an XLS spreadsheet, but Ideally I want it to be vertically, and I want to include the same user defined data alongside each one.
It should end up looking like this:
Name: Bobby
Surname: Robson
Favorite food: Chips
Etc. I'd also ideally like to include a second set of two columns.
Is this possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有一个名为 pyExcelerator 的 Python 包,可以通过 Python 脚本将 MySQL 数据导出到 Excel。 MySQL 本身并不以 Excel 二进制格式输出。
编辑:根据OP的评论,这里是用于编写Excel的Perl模块电子表格。据推测,Perl 已经支持 MySQL 了;)
There is a Python package called pyExcelerator that can export MySQL data to Excel via Python script. MySQL itself doesn't output in Excel binary format though.
EDIT: Based on the OP's comment, here is a Perl module for writing Excel spreadsheets. Presumably, there exists Perl support for MySQL already ;)