使用 PHP 将 .xlsx 文件转换为 .csv 文件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6895665/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 01:34:08  来源:igfitidea点击:

Convert .xlsx file to .csv file using PHP

phpexcelcsvfile-conversion

提问by Avigayil

I'm looking for a low overhead way to convert a .xlsxfile to a .csvfile using PHP without consuming excess memory or loading extraneous classes. Anyone?

我正在寻找一种低开销的方法来使用 PHP将.xlsx文件转换为文件,.csv而不会消耗过多的内存或加载无关的类。任何人?

回答by sbrattla

You can read XLSX files with PHP using PhpSpreadsheet. From there, you only need to figure out the destination format.

您可以使用 PHP 读取 XLSX 文件PhpSpreadsheet。从那里,您只需要找出目标格式。