Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • 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
@chrismserratos_twitter can u put more of this error ?
@bluemoonfr1 make fork on github? :d
@markosko I wouldn't dare - and don't know how to :-)
Brent Arias
Is it possible for a "Server-side JWT" auth approach to access individual user's box accounts and contents? Or to accomplish that, do I need to use client-side OAuth (3 legged oauth)?
Brent Arias

Also, for client-side OAuth, I have questions regarding an app that makes multiple requests for an access token and refresh token:

  • Will each such redundant request be honored?
  • If yes, how many outstanding refresh tokens are allowed?
  • Can these multiple redundant requests cause the prior request(s) tokens to become invalid?

I'm asking these questions because I'm contemplating a farm of daemons that are collectively acting as the same custom app...and each needs to have an access token (and possibly a refresh token).

Is there any way to get the last row inserted?
Hello everyone, how can I add a line break in each row that I add?
Hello. Where can I find documentation for 2.7 version?
@brentarias this library dont have anything with oauth
@marcosrgdev traverse every line until to end problem of how xlsx is made
Hooman Naghiee
any news on box/spout#715
hello, how can i clean a sheet? or delete all rows?
i have to export data to an existent excel file, and rows could be as much as 700.000 lines and for each export, data have to be cleaned to put new data
could you help me?
@r3morales about cleaning data u cant directly rewrite excel, u can make only new and read rows/sheets from old one
and copy to new one
Hello, i have a question : where are you going merge this PR box/spout#763 and publish a new version of the bundle, or how i could resolve memory issues with CreateRowFromArray ?
3 replies
Rizal Fakhri
is this chat still active?
1 reply
hello, I got a large dataset and Spout XLSX writer doesn't write until whole dataset gets written. Is there any provision, where I can push 100 rows conditionally
2 replies
Buenas, como puedo darle formato a una celda tipo numérico... agradeceria su ayuda...
florida Bakollari
Hi, is it possible to change format for a specific cell to number?
Japita Systems Engineering
Hi. I received a memory full message:Fatal Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in [vendor/box/spout/src/Spout/Writer/Common/Manager/Style/StyleRegistry.php, line 108]
2021-05-09 12:38:59 Error: [Cake\Error\FatalErrorException] Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /vendor/box/spout/src/Spout/Writer/Common/Manager/Style/StyleRegistry.php on line 108
Japita Systems Engineering
For very large file, XSLX does not work. Is there any stream approach? For CSV it is ok.
Hello, maybe post code as its hard to say but streaming should have been no problem unless u have somewhere in your code problemati part
Adrien Loison
Also, specify which version of Spout you're using please
Yusliel Garcia
H i, I have a pre-formatted xlsx file with header styles, formulas.. Is posible open it and write data into it, preserving original format using box/spout?? Something like PHPExcel
2 replies

hi all

Import CSV
Read CSV
Sort CSV check data is okay and consistant
Filter CSV via rules
Display Current Imports inc how many skipped / imported / updated
Confirm Import
save to database

is Box/spout able to do this
1 reply
Hi all, i need to open an existent excel file (something like a base model), modify it in memory and download to client
do you think is possibile whitout writing on disk with spout?
something like open, read and instead of persist, return something like a MemoryFileResponse?
Adrien Loison
@asterd It's possible to read your base template, write a modified version of it without needing to store the final version on disk. Note that XLSX file processing always require some writes on disk (but they can be temporary) as we need to assemble/zip a bunch of XML files together.
You can look at the 2 first guides for help: https://opensource.box.com/spout/guides/
ok thanks a lot..
@adrilo Dans le cadre d'un projet qui consiste à extraire des données d'une base et de générer des fichiers excel et Ods, j'ai été amené à apporter quelques modifications à Spout pour avoir le même niveau de production dans les deux formats (ajout de l'alignement vertical, des liens htttp, des formats de nombre et de date pour ODS, possibilité de mettre une partie du texte d'une cellule dans une couleur différente - ou de lire une cellule ainsi formatée), j'aimerais vous envoyer un exemple de cette production. Où puis-je le déposer ?
3 replies
Ian Wellock
Is it possible to find out how many rows are in an XLSX file after opening it?
Adrien Loison
@NightIsland You have to iterate through all the rows. Some XLSX files do have the information ready before reading them entirely but some don't. That's why in Spout we took the decision to force users to read the entire spreadsheet.
This would work:
foreach ($reader->getSheetIterator() as $sheet) {
    $numRows = 0;
    foreach ($sheet->getRowIterator() as $row) {
Although it may take a while for large spreadsheets

I want to read 3 crore csv rows which is of 2GB csv file size and need to insert into MySQL via Java.

Could someone please help me know the fastest and memory efficient way to avoid out of memory exception as well load in lesser time?

Please kindly advise.

@brightinnovator try use transactions, and insert in batches
@markosko can you please help me with a good reference link...any good link you suggest to be followed..that would help a lot..i don't even require a full code but looking for some suggestions, links and comments
hard to do but why u combine php and java ?
i don't got help in anywhere..so pasted here. Please share a link if possible
Madhur Bhaiya

Hi, I have received a XLSX file from client (which I believe is created using Excel 2007). But Spout is giving "Error on opening file" for this excel.
I have created issue here: box/spout#823

Can someone take a look pls

Ruben Pajaron
Hello guy ,I have a little problem with Spout, everything works fine, it creates and downloads a generated xlsx with my rows, but
it downloads the file with the name of the php containing the code, not with the one I assign to it (example: "test.xlsx")
If the code is in the file "export.php", the name of the xlsx file downloaded is "export.php", if I rename it to "export.xlsx", it is ok.
Could someone please help me?
Ruben Pajaron
ammmm, solved xd
excuse me, but example for convert xls to csv with spout? read xls ok...but write to csv reading xls? thank you