by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 19:55
    alessandrotesoro starred box/spout
  • Jan 31 2019 19:40
    Maxeee09 starred box/spout
  • Jan 31 2019 19:05
    metallurgical starred box/spout
  • Jan 31 2019 13:04
    barryvdh commented #624
  • Jan 31 2019 11:48
    rn1000 starred box/spout
  • Jan 31 2019 11:04
    kruglikdenis starred box/spout
  • Jan 31 2019 10:28
    gjportegies starred box/spout
  • Jan 31 2019 09:06
    guanhui07 starred box/spout
  • Jan 31 2019 08:44
    JingwenTian starred box/spout
  • Jan 31 2019 04:28
    absalomedia starred box/spout
  • Jan 31 2019 02:03
    brnmonteiro starred box/spout
  • Jan 31 2019 02:01
    kaishuizhuyu starred box/spout
  • Jan 31 2019 01:30
    OHOM starred box/spout
  • Jan 31 2019 00:51
    cherryred5959 starred box/spout
  • Jan 31 2019 00:50
    yanghaifeng88 starred box/spout
  • Jan 30 2019 21:43
    barryvdh edited #624
  • Jan 30 2019 21:22
    barryvdh edited #624
  • Jan 30 2019 21:20
    barryvdh commented #616
  • Jan 30 2019 21:19
    barryvdh opened #624
  • Jan 30 2019 21:16
    barryvdh commented #612
markosko
@markosko
@drevendy_gitlab @rbastida this library works only with newer xlsx
xls is binary format not like xlsx which is zipped archive of xmls files
viest
@viest
Hi everyone, I am the author of the PECL project xlswriter and am very happy to be able to join the room, xlswriter is a very quick xlsx processing extension.
Adrien Loison
@adrilo
Welcome @viest ! You have a very cool project too :)
viest
@viest
@adrilo Thank you! spout is also very cool, learning object.
Yonathan Rizky Nathanael
@yonathan12
hi, I just tried using spout, can spout be used for merge center?
Alexander Golubow
@agolubow
Hello, can someone tell me how to get the number of sheets with the XLSX reader? I cannot locate any documentation that lists class methods, I can only find basic usage examples (including advanced usage).
markosko
@markosko
For now u can only count with forrach
Md. Abdullah Abu Syeed
@EnggShovon_gitlab
Well Hello
Is there any way to write in a specific cell in excel by using box spout in php??
Could you please help me ??Facing a big problem
svhnl
@svhnl
Hello everyone. I am having a problem with reading uploaded files ($_FILE) with Spout. I have posted a question on Stackoverflow. If someone could take a look at it, that would be wonderful. Cheers.
markosko
@markosko

Well Hello
Is there any way to write in a specific cell in excel by using box spout in php??
Could you please help me ??Facing a big problem

nope u cant write to only cell like C3, u need to send row by row before sending 2 rows before that

markosko
@markosko

Hello everyone. I am having a problem with reading uploaded files ($_FILE) with Spout. I have posted a question on Stackoverflow. If someone could take a look at it, that would be wonderful. Cheers.

and whats exactly problem there ?

claudiazeredo
@claudiazeredo
Hello, I have an doubt about styling. I'm new one on using spout and when I try to reproduce the example from documentation, the style was over the cell not over the single row.
All the three rows having styled, not only one.
Sorry for my english. Code below...
public function teste(){

    $writer = WriterEntityFactory::createXLSXWriter();
    $writer->setShouldUseInlineStrings(false);
    $fileName =  'teste.xlsx';

    $writer->openToBrowser($fileName); // stream data directly to the browser

    $sheet = $writer->getCurrentSheet();
    $sheet->setName("SHEET 1");


    $cells = [
        WriterEntityFactory::createCell('Carl'),
        WriterEntityFactory::createCell('is'),
        WriterEntityFactory::createCell('great!'),
    ];

    $style = (new StyleBuilder())
       ->setFontBold()
       ->setFontSize(15)
       ->setFontColor(Color::BLUE)
       ->setCellAlignment(CellAlignment::CENTER)
       ->setBackgroundColor(Color::YELLOW)
       ->build();
    /** add a row at a time */
    $singleRow = WriterEntityFactory::createRow($cells,$style);
    $writer->addRow($singleRow);

    /** add multiple rows at a time */
    $multipleRows = [
        WriterEntityFactory::createRow($cells),
        WriterEntityFactory::createRow($cells),
    ];
    $writer->addRows($multipleRows); 

    /** Shortcut: add a row from an array of values */
    $values = ['Carl', 'is', 'great!'];
    $rowFromValues = WriterEntityFactory::createRowFromArray($values);
    $writer->addRow($rowFromValues);
    ob_clean();
    $writer->close();

    header("Content-type: application/x-msdownload");
    header("Content-Disposition:attachment; filename=$fileName");
    header("Expires: 0");
    exit();


}
image.png
yiranzai
@yiranzai
yiranzai
@yiranzai_gitlab

I used Spout in our project.
I write like this .(\$filename is chinese)

use Box\Spout\Writer\Common\Creator\WriterEntityFactory;

$filename = '财务数据.xlsx';
$writer = WriterEntityFactory::createXLSXWriter();
$writer->openToBrowser(rawurlencode($filename));
...

$writer->close();

Opened with Chrome, I got 财务数据.xlsx, opened with Safari, I got %E8%B4%A2%E5%8A%A1%E6%95%B0%E6%8D%AE.xlsx.

For special reasons, the character set of the server system is C and cannot be modified, so if I don’t use rawurlencode(), Chinese will disappear, such as abc中文.xlsx to abc.xlsx.
See #745 for details
DJ Thomass
@deejaythomass_twitter
Hi, is it finally possible to merge cells in Spout ? I really need this feature...
if yes, how to do that ?
Thanks !
Yago Benítez de Miguel
@benitezdemiguel
Hi, i used spout in my project, im trying to read a csv file which is 1 gb but it gives me the usual error Allowed memory size of 8589934592 bytes exhausted (tried to allocate 268435456 bytes) ... i choose this library to avoid that as it says it doesn't use too much RAM, but i don't know if im doing something wrong
markosko
@markosko
@benitezdemiguel can u put code here ? Hard to say what u have done
TheSaltwaterRoom
@TheSaltwaterRoom
怎么合并单元格??
Pankaj Gupta
@pankaj_octal_gitlab
Hi How I can access rows in chunks from excel file
markosko
@markosko
@pankaj_octal_gitlab u can access only row by row
Pankaj Gupta
@pankaj_octal_gitlab
@markosko okay thanks
jherc
@jherc
Hi, I can generate graphics through spout?, I'm migrating from phpspreadsheet
Eduardo Nuno Ferreira Vasconcelos
@oBnon_gitlab

Hello, is this chat room still active?

I'm experimenting with spout to export a very large amount of records after phpspreadsheet failed me
The only things I'm missing are merging cells (which I can work around) and setting a column width

I know spout doesn't support this but I've seen some people talking about it and I'd like to know if anyone can show me how