douhuang1973 2015-08-18 09:53
浏览 197

excel的实际限制是1048576。 如果行达到该级别,则必须转到下一个工作表。 有什么建议

Here is my code

$output = $filename.".xls";
$output = "../downloads/".$filename.".csv";
$output_zip = "../downloads/".$filename.".zip";
$fp = fopen($output, 'w');
$sheet = $objPHPExcel->getActiveSheet();
if ($fp==false) echo "Failed to pen file stream";
$myArr = array();
while ($finfo = mysqli_fetch_field($res)) {
    $myArr[]=$finfo->name;
}   
fputcsv($fp,$myArr);
$my_i=1;
while ($row = mysqli_fetch_row( $res )) {
    $myArr = array();
    foreach($row as $key=>$value) {
        $myArr[]=$value; 
    }
    fputcsv($fp,$myArr); $my_i++;
}                                
fclose( $fp );
  • 写回答

1条回答 默认 最新

  • douyan4470 2015-08-18 10:33
    关注

    A CSV or a text file can have many more rows than the Excel sheet limit.

    If you want to bring that data into Excel, you can use Power Query to connect to a CSV file and make it available for processing in the spreadsheet. Power Query can also connect to many other data sources, any of which can return way more than the Excel row limit.

    You may want to use 64 bit Office for projects that involve a lot of data.

    Power Query is a free download for Excel 2010 and 2013. In Excel 2016 for Windows, it is integrated into the Data ribbon.

    评论

报告相同问题?

悬赏问题

  • ¥20 模型在y分布之外的数据上预测能力不好如何解决
  • ¥15 processing提取音乐节奏
  • ¥15 gg加速器加速游戏时,提示不是x86架构
  • ¥15 python按要求编写程序
  • ¥15 Python输入字符串转化为列表排序具体见图,严格按照输入
  • ¥20 XP系统在重新启动后进不去桌面,一直黑屏。
  • ¥15 opencv图像处理,需要四个处理结果图
  • ¥15 无线移动边缘计算系统中的系统模型
  • ¥15 深度学习中的画图问题
  • ¥15 java报错:使用mybatis plus查询一个只返回一条数据的sql,却报错返回了1000多条