Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
jbtsp
@jbtsp
@MarkBaker I do not consider this 'not perfect', but more like a feature enhancement request.
@MarkBaker It would make centering an image on the page easier.
@MarkBaker Is this something that could be adjusted for the next release?
Mark Baker
@MarkBaker
The correct approach to requesting a feature enhancement, is to raise it as an issue on github, although its a lot more complex than you seem to believe, and I'm not sure how simply being able to specify offsets (from A1) would help centre an image "on page". PHPSpreadsheet doesn't have this concept of a page
jbtsp
@jbtsp
@MarkBaker Sir, I never said it was easy. That is why I am asking the expert -- you. Sometimes I create a spreadsheet that is intentionally designed to be printed.
In Firefox when I open/download a PHPSpreadsheet generated xls file from our website it opens in Alibre Calc, I click the 'Edit Document' button in the upper right, then click the print preview one time, then again to hide print preview, and a vertical line appears which shows me what I think is the printer margin. I try to place an image in the center. The offset cannot be more than the cell width, so sometimes I have to change the starting cell. I print the page and then use a ruler and adjust the positioning.
Sometimes I change the spreadsheet columns widths dynamically, and this wrecks the centering of an image. If I could always start at cell A1 and have the offset be more than the cell width, then the centering would not be affected by dynamic cell width adjustments.
@MarkBaker I will raise it as an issue on github.
Mark Baker
@MarkBaker
So you mean printed page. That means PHPSpreadsheet has to be aware of the resolution of the printer that you are using, and the size of paper that you have.Your spreadsheet GUI (LibreOffice Calc, Gnumeric, MS Excel, etc) is running on the client, with access to printer information, o it can perform this calculation; but PHPSpreadsheet is running on a server, without that information available.
jbtsp
@jbtsp
@MarkBaker No. PHPSpreadsheet does not need to know anything about my printer.
@MarkBaker That is not what I said.
@MarkBaker I created an issue # 770 PHPOffice/PhpSpreadsheet#770
@MarkBaker I sometimes change column widths in the xls file dynamically, using the same program/report and this can make the centering not work, for instance it if I center the image using cell C1, then dynamically adjust the cell width of cell B1, the centering will not work.
jbtsp
@jbtsp
@MarkBaker I would not be able to do this in cell A1 because it is not close enough to the center I desire. C1 was close enough, but then later I adjusted cell B1 and the image is no longer centered.
@MarkBaker I do this dynamically, meaning that cell A1 might contain a SSN, but for some of our 300+ clients they do not want to have the SSN display, so I hide that column dynamically by the program code.
jbtsp
@jbtsp
@MarkBaker How does Alibre Calc allow me to drag the PHPSpreadsheet image anywhere on the spreadsheet? Can you find that code and use it to adjust PHPSpreasheet image offset positioning?
dirtyluke
@dirtyluke
hi, when i open one xlsx file which i rewrite another one with PhpSpreadsheet , i got the message We found a problem with some content in '****.xlsx'. Do you want us to try to recover as mush as we can? If you trust the source of this workbook, click Yes.. And when i click yes, i found it lost some styles and charts. Then i unzip it ,and i found it lost some files after i compared with the original one. how can i fix this problem( i use Excel 2016 to open the xlsx file)
Asante Michael
@AsanteM22683095_twitter
I am trying to extract an excel file into a cpanel MySQL Database but i keep getting problem in extracting the data when i run the Php file
Please help me out
dirtyluke
@dirtyluke
finally , i found that <c:axId val="75091328"/> tag value is wrong. but who knows why this cause Excel2016 notification like i mentioned above @MarkBaker @jbtsp
Mark Baker
@MarkBaker
Since when did phpcs start insisting that use clauses were listed in alphabetic order?
Adrien Crivelli
@PowerKiKi
@MarkBaker PhpStorm can do that for you and you can apply for a free license for PhpSpreadsheet
Mark Baker
@MarkBaker
I know it can, and have the license (though it needs renewing next month).... but my XXE security patch is failing build extra checks on files that I haven't even touched because of order of use... so I'm guessing that there' a new phpcs being pulled by travis that enforces it as a default behaviour
Mark Baker
@MarkBaker
Ah. My bad... I was running phpcs locally, and it was picking up on a set of local files I had that aren't part of the repo
Also need to fix the problem with the doctrine instantiator and PHP 5.6... will do that this evening... then at least I'll have the xxe security patch read to merge and release
Adrien Crivelli
@PowerKiKi
@MarkBaker I expect you composer update with a PHP other than 5.6, and thus installed an incompatible instantiator... why did you update in the first place ?
Mark Baker
@MarkBaker
Yes. I did, but it's resolvable when I get home... either reverting the lock file, or enforcing doctrine/instantiator 1.0.5 in the composer.json
Adrien Crivelli
@PowerKiKi
:+1:
Mark Baker
@MarkBaker
But checking on that highlights the same issue/resolution for my calc engine matrix branch... And fixing there will allow me to continue rewriting the trend lines code
I do like that new github feature for offering/accepting changes when reviewing code.... it's pretty cool
Adrien Crivelli
@PowerKiKi
yup, never could accept it yet, but suggesting it is nice
btw, I noticed that your libs use slightly different convention for folder names: classes, unitTests VS src, tests. I don't mind all that much, but I thought if you don't have any specific reason it might be nice to be coherent with PhpOffice projects
Mehdi Chaouch
@mehdichaouch
Hello
Mehdi Chaouch
@mehdichaouch
Someone know why SWITCH function is not supported (my supposition is based on lib/Phpspreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xls/Parser.php:215)
and do you have any alternative better that IF imbrication... like this : =IF(plop,1,IF(flip,2,IF(clac,3,0))))
Mehdi Chaouch
@mehdichaouch
(Nested IFs)
Mark Baker
@MarkBaker
Probably it doesn't work because MS Excel never had a switch() function supported by BIFF-format xls files
It's only been introduced very recently, and is only supported for Office 365, not even for Excel 2016
So PHPSpreadsheet doesn't provide any support for it yet
Mehdi Chaouch
@mehdichaouch
@MarkBaker it's from 2016 of course
do you know if implementing this is hard work ?
Mark Baker
@MarkBaker
"Note: This feature is not available in Excel 2016 unless you have an Office 365 subscription. If you are an Office 365 subscriber, make sure you have the latest version of Office."
SWITCH() isn't necessarily hard to implement, just time-consuming; but it wouldn't ever be available for the Xls Writer
Mehdi Chaouch
@mehdichaouch
ok.
Thank you for your feedback
I'll try to make a function to work with Nested IFs
to be sure to have cross compatibility
Marcus Uerlings
@muerlings_twitter
Hi

I´m having a probem with HTML writer when adding nuber format like:
'- * #,##0.00-;[Red]- #,##0.00-;- "-"??-;-@_-'

It displays with html tag span and style on browser

Marcus Uerlings
@muerlings_twitter
instead of just displaying the number in red.
Does someone had the same problem?
Sean Pearce
@smpita
PHPSpreadsheet edited spreadsheets are breaking CenturyLink's efax service resulting in an empty cells if it's formatted as currency. If the document is opened in Excel and immediately saved, the spreadsheet faxes normally. This issue occurs regardless of the type of change made by PHPSpreadsheet -- currently we're just resizing columns from a downloaded report. The unedited report faxes normally. Any ideas?
Fräntz Miccoli
@frantzmiccoli

@MarkBaker thanks for your reply on PHPOffice/PhpSpreadsheet#788 do you think that it is feasible to "hack" the stack based parser in order to give a specific processing to IF calls ?

I am deep in processTokenStack(), still trying to figure what's happening around. If you think it is close to impossible to implement something without generating side effects I will stop there.