Feb 14, 2013 at 12:48 PM
Edited Feb 14, 2013 at 12:49 PM
I really don't understand what you're asking for. the removeRows() method allows you to select a starting row, and a number of rows to delete. All rows below the deleted rows move up.... that's pretty much what happens if you do it in Excel, though
Excel does a few other things with formula references that you don't mention.... and PHPExcel also does those. And it certainly doesn't remove column formatting.
ok I deleted the last rows in sheet so only the formatting was removed and I thought the rows wouldn't move up.
Here now a more exactly description:
if you run this
you get somethin like this as result:
now you run this:
and the excelsheet looks like this:
if you delete rows in the middle
you will get this:
so theres in the rows 4 and 5 no formatting anymore.
Are you just asking us to make it faster so that it will run in less than a second?
There's some changes I'm testing at the moment that will make inserting/deleting faster, but it still won't be instantaneous without any processing required at all.
That's what i meant. I supposed that there are some checks, which take some time, before the code will delete the row. I don't know how the cells where stored internally. Also thought if they are stored in an array, why dont use something like array_splice.
But could be that I'm thinking to easy at this point. Therefore I don't know the code good enough.
This delete function don’t need any checks of formulas or other things cause all cells depending on each other will also be deleted.
I just don't follow this logic.... so you want all cells that contain formula referencing the deleted rows to be automagically deleted as well? Excel's delete does formula checks and makes adjustments across the spreadsheet whenever you delete a row or column,
PHPExcel does the same... you're saying you want what Excel does, but don't want it to work the same way?
I didn't mean it like that. I tried just to explain, with my bad English knowledge, that I need a function which hasn't any need for checks and is just fast.