Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
tputraa
@tputraa
Class 'CachedObjectStorageFactory' not found in phpspreadsheet, how m8?
Xenothan Hojem
@xenothanhojem
Hey Guys
Am looking to use PHPPresentation and PHPWord in my Laravel 5.6 app, any pointers?
Adrien Crivelli
@PowerKiKi
@tputraa it seems you migrated from PHPExcel and are looking for \PhpOffice\PhpSpreadsheet\Collection\CellsFactory
@xenothanhojem Try your luck in their Gitter rooms, not here
tputraa
@tputraa

@PowerKiKi this my code
$cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_to_phpTemp;
$cacheSettings = array('memoryCacheSize' => '8MB');
PHPExcel_Settings::setCacheStorageMethod($cacheMethod, $cacheSettings);

i dont understand correlation between cachedobjectstoragefactory and cellsfactory.
please help me

Adrien Crivelli
@PowerKiKi
@tputraa you are using PHPExcel, but this is a Gitter room for PhpSpreadsheet. You are in the wrong place, and more importantly you are using the wrong library, see: https://github.com/PHPOffice/PHPExcel#phpexcel---dead
tputraa
@tputraa
@PowerKiKi i mean i should change that method to phpspreadsheet style, but which one
i dont see correlation between cachedobjectstoragefactory and cellsfactory
Adrien Crivelli
@PowerKiKi
@tputraa see https://phpspreadsheet.readthedocs.io/en/latest/topics/migration-from-PHPExcel/, there is a section dedicated to caching
ahdavis
@ahdavis
I'm sorry if this has been asked before, but I didn't see it when I searched. Are there any plans to implement Excel's document password encryption feature where you have to enter a password to open the file? For my purposes, it doesn't have to be compatible with Excel's encryption algorithm. I just need to create a file and encrypt it with a password, so the user is prompted for the password to open the file. Thanks
Alan
@lovealan
How do I know which cells are merged?
Adrien Crivelli
@PowerKiKi
@ahdavis AFAIK, there's nobody actively working on encryption. But a contribution would certainly be appreciated !
@lovealan try \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet::getMergeCells() and read https://phpspreadsheet.readthedocs.io/en/latest/topics/recipes/#mergeunmerge-cells
Alan
@lovealan
Thx,I got it
Carlos A. Molano
@carlosmolano
so noone ever tried to open a password protected excel file with phpspreadsheet?..
Fräntz Miccoli
@frantzmiccoli
I just observed that the activity log on the right of the Gitter UI seems broken since a few months.
Adrien Crivelli
@PowerKiKi
@frantzmiccoli thanks for letting me know, it's been re-activated
Fräntz Miccoli
@frantzmiccoli
You are welcome
Santosh Patel
@newblend_no8_twitter
Hi, using Phpspreadsheet to read Excel files and consume the data/metadata (not excel anymore). Is there a way to suppress adding _xlfn. to functions that Phpspreadsheet does not recognize? Getting an issue with CONCAT.
William Minerva
@WilliamMinerva3_twitter
hello
Andriy Khyliuk
@Smartop
how get row by sheet index $sheet->getRowIterator() , for example i need get only second row in current sheet without foreach?
VertZu
@VertZu
What I want is - If I have date (A2:A5) for example 1.4.2019 and I want that day's expenses (B2:B5) in format of B2+B3+B4... and so on
And if they are paid with credit card (C2:C5), I want them in same format also C2+C4+C5.. they might not have been paid with card so that needs to be left out
I want business expenses + paid with card to same row where the is already put date when they were made to another Excel file without making a new excel, just updating existing one. Is this possible with phpspreadsheet?
Adrien Crivelli
@PowerKiKi
@Smartop try something similar to:
$row = new Row($sheet, 2);
Michel Ojeda
@kristofermagic
Hello Everyone

I'm just trying to use the PhpOffice/PhpSpreadsheet with ZF3. I installed by composer and when I used then : $inputFileType = 'Xls';

    $reader = IOFactory::createReader($inputFileType);

my application show the following error: Class 'PhpOffice\PhpSpreadsheet\IOFactory' not found

Michel Ojeda
@kristofermagic
etc, etc
Dan Eveland
@duckydan
@kristofermagic Hi, this might be super basic, but did you put in the “Use” lines to load the classes?
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
Michel Ojeda
@kristofermagic
yes, I did!
use PhpOffice\PhpSpreadsheet\IOFactory;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Reader\Xlsx;
private function readExcelFile( $inputFileName )
{
$inputFileType = 'Xls';
    $reader = IOFactory::createReader($inputFileType);

    $reader->setReadDataOnly( true );
    $spreadsheet = $reader->load($inputFileName);

    $sheetData = $spreadsheet->getActiveSheet()->toArray(null, true, true, true);
    return $sheetData;
}
Dan Eveland
@duckydan
@kristofermagic I just started working with this yesterday. Wish I could help.
Michel Ojeda
@kristofermagic
thanks a lot. Me too. I was developing some test from my local and it worked pretty good, but with ZF3, I could not.
Michel Ojeda
@kristofermagic
Somehow, the IDE perfectly recognizes the namespace and take me to the scripts definitions when I click it over without no problem. would it be something related to autoload.
Michel Ojeda
@kristofermagic
@PowerKiKi How can I use this in ZF3??
Adrien Crivelli
@PowerKiKi
@kristofermagic try composer install so that composer re-generate the autoloader
there is nothing specific with ZF3
oh, and of course triple-check that you require_once 'vendor/autoload.php'; somewhere in your project, but that must be already the case if you use ZF3
on a final note, use triple backticks (`) blocks to properly format code in this chat
VertZu
@VertZu
$KolumnDate = 1; // kolumn 1 = B
for ($RowDate = 1; $getOrder->getCellByColumnAndRow($KolumnDate,
$RowDate)->getFormattedValue() == "4/1/2019"; $RowDate++) {
if ($getOrder->getCellByColumnAndRow($KolumnDate, $RowDate)->getFormattedValue() == "4/1/2019" );
{
echo $RowDate;
}
}
Returns NULL Whats wrong?
Adrien Crivelli
@PowerKiKi
@VertZu please format your code correctly with markdown syntax if you wanna get helped
Michel Ojeda
@kristofermagic
@PowerKiKi Thanks a lot. I appreciate your help. I'll try and let you know about it.
Michel Ojeda
@kristofermagic
@PowerKiKi Sorry it does not work for me. I tried but I was checking on my z-ray and I saw in the classes map and I could not be able to see PhpSpreadsheet for anywhere.
Jérémie Asaro
@jeremie.asaro_gitlab
Hello everybody
If somebody can help, that would be super nice
I just made the migration of a project using PHPExcel to PHPSpreadsheet, and all is fine BUT one thing
Messed up Cell Background Color
and it's driving me crazy because it has a high visual impac