Generate and email excel file as an attachment - Error message: unable to read file

前端 未结 1 585
无人及你
无人及你 2021-01-29 05:05
//to genrate EXCEL files
require_once(\'documentation/Excel_Writer/Writer.php\');  
   if($_POST[\'submit\'] == \"Email as EXCEL\"){


     // get values

      $dated1=         


        
相关标签:
1条回答
  • 2021-01-29 05:57

    1) i have modified ur piece of code, try using this

            $worksheet->write(0, 0, "TransactionID");
            $worksheet->write(1, 0,  $format_bold);
            $worksheet->write(0, 1, "Date");
            $worksheet->write(1, 1,$format_bold);
            $worksheet->write(0, 2, "Type");
            $worksheet->write(1, 2, $format_bold);
            $worksheet->write(0, 3, "Transaction Details");
            $worksheet->write(1, 3, $format_bold);
            $worksheet->write(0, 4, "Currency");
            $worksheet->write(1, 4, $format_bold);
            $worksheet->write(0, 5, "Amount");
            $worksheet->write(1, 5, $format_bold);
            $worksheet->write(0, 6, "Balance");
            $worksheet->write(1, 6, $format_bold);
    

    And according to the above code modify the code inside for loop.

    2) "$worksheet =& $workbook->addWorksheet();"

    Add some name to your workbooksheet

    e.g $workbook = new Spreadsheet_Excel_Writer($excelfillename);

    0 讨论(0)
提交回复
热议问题