Mysql查询结果导出Excel表:


一句转换方式:
$ mysql -uops -p'GCNgH000KP' dtbs -e 'select * from t_proxy__record;' --default-character-set=gb2312 > ooooo.xls

或者

两句转换方式:

$ mysql -uroot -p'password' dtbs -e "select * from help_cat where 1 order by type desc limit 0,20;" > type.xls
$ iconv -futf8 -tgb2312 -otype.xls type.xls    //(1)用此方式转换文件编码格式  或者  (2)windows里面记事本打开另存ANSI格式文件,否则windows中查看有乱码。

 

相关文章:

  • 2021-12-14
  • 2022-12-23
  • 2022-12-23
  • 2021-11-12
  • 2021-06-18
  • 2021-12-02
  • 2021-12-02
猜你喜欢
  • 2021-12-02
  • 2021-12-02
  • 2021-12-02
  • 2022-01-25
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
相关资源
相似解决方案