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
Tushar Agarwal
@tusharcoder

@tusharcoder only way would be open existing and read line by line to new one

so can we do interactive editing of the spreadsheet by user using php

Percy
@panzk412
can Spout merge cells ?
Percy
@panzk412
@alessandrotesoro can Spout merge cells ?
markosko
@markosko
@panzk412 not implemented yet
@drevendy_gitlab u didnt but probably framework did
Rayhan Yulanda
@RayhanYulanda
is it possible to this library for import 2.000.000 row excel?
markosko
@markosko
@giraam yea its possibpe but would take longer time to read that excel
Some minutes probably @RayhanYulanda
bluemoonfr1
@bluemoonfr1
I have just added some things in Spout for XLSX : vertical alignment, row heights, column widths, hyperlinks. Not sure it could interest anyone, but in case...
markosko
@markosko
maybe put pullrequest but mostly would be on @adrilo if he wants to accept changes
nicoleta-iuliana
@nicoleta-iuliana
Hello everyone, I want to use spout package to stream data in to CSV temporary file but I didn't find any documentation that says I can do that. So, I can do this with spout, or should I find another library ? Thanks.
markosko
@markosko
@nicoleta-iuliana stream as in write to file ?
nicoleta-iuliana
@nicoleta-iuliana
Yes, sorry for the late response.
markosko
@markosko
something like $writer->openToFile("path_to_temp_file"); @nicoleta-iuliana
MrElLeRm
@MrElLeRm
@markosko Hi man! I want to ask about this PR: box/spout#715 Any chance that this PR will be in your library? It's very needle thing!
markosko
@markosko
@MrElLeRm this is not my library so dont know
MrElLeRm
@MrElLeRm
@markosko Thx for reply!
markosko
@markosko
@MrElLeRm library is done by @adrilo but noone forces u to not download lib from PR fork
MrElLeRm
@MrElLeRm
@markosko Yep, this was my second idea, but i'm think @adrilo should implement this thing in him library, because this is very needle thing in libraries kind of this
Valentin Merlet
@ValentinMerlet
Hello everyone, I would like to know if this is possible to with Spout to write a list of values inside a single cell ? Maybe I missed something but I didn't find anything about it in the documentation.
markosko
@markosko
@ValentinMerlet what u mean list of valuse?
in single cell u can put only one value or atmost string containing some values by commas or someting
Valentin Merlet
@ValentinMerlet
I mean this kind of list : https://imgur.com/a/DieuvUz
markosko
@markosko
thats somewhat special thing its from some values defined
LucasBerger
@LucasBerger
hey, is there a website with a documentation for spout v2?
abdallahboodhun
@abdallahboodhun
Hello i am struggling with a piece of how code....I want to get the column.

Hello i am struggling with a piece of how code....I want to get the column.

foreach ($sheet->getRowIterator() as $rowNumber => $row) { foreach($row as $k => $value){ //i want to get column here $rowDetails[] = $value; } }

markosko
@markosko
@abdallahboodhun hello and whats problem ?
abdallahboodhun
@abdallahboodhun
@markosko Hello i have been able to resolve this issue. but now i want to read data from a radio button in an excel...can this be done using spout?
Tomáš Smetka
@smety
Hi, I found this library, thank the authors for the veil :)
Drevendy Harianto
@drevendy_gitlab
can i save it to xls format?
Roger
@rbastida
Hi! I am new to spout library, and I want to do a simple code to write my database data into xls, and permit user to download from browser the result... anybody can help me?
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