gskidds

Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • in reply to: export to excel #126944
    gskidds
    Participant

    Great Will,

    Thanks, much prefer to NOT change the source code.

    G.

     

    in reply to: export to excel #126939
    gskidds
    Participant

    You are welcome,

    Just an FYI: when I freeze the first 2 rows like that, excel sizes the first column to the length of the Header row information. To avoid that you can add:

    $objWorksheet = $objPHPExcel->getActiveSheet()->mergeCells(‘A1:Z1’);

    after the freeze statement:

    $objWorksheet = $objPHPExcel->getActiveSheet()->freezePane(‘B3’);

    Column 1 will then size correctly.

    Regards,

    Gordon.

    in reply to: export to excel #126935
    gskidds
    Participant

    Will,

    It work now but the customer wants to freeze the first two rows when outputting to excel. I could not find anyway to do it via the parameters, so I did a temporary fix for it by modifying jqGridExport.php with the line:

    $objWorksheet = $objPHPExcel->getActiveSheet()->freezePane(‘B3’); //gws 20180808

    following:

    $objWorksheet = $objPHPExcel->getActiveSheet();

    Is there a way to do it via the export parameters? Or will that be available in a future release?

    Thanks.

    Gordon.

     

    in reply to: export to excel #126934
    gskidds
    Participant

    Thank You Will, looks like it works now, the only change I had to correct was changing options.exporttype === ‘pdf’ to options.exporttype === ‘excel’

    I will know Wednesday when my customer tries it and tells me it is good (or yells at me and says ‘wtf’ it still isn’t what I want LOL.

    gordon.

    in reply to: export to excel #126931
    gskidds
    Participant

    Sorry, here is the full line of code in the PHP

    $grid->setColProperty(‘REV_TOT’, array(“label”=>”Revenue”, “formatter”=>”currency”,”formatoptions”=>array(“isExported”=>true,”exporttype”=>”excel”,”decimalPlaces”=>2,”thousandsSeparator”,”,”),”align”=>”right”));

Viewing 5 replies - 1 through 5 (of 5 total)

Stay connected with us in your favorite flavor!