PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, October 5, 2022

[FIXED] How to keep the cell references from another sheet updated when adding new rows with PHPExcel

 October 05, 2022     phpexcel, phpexcel-1.8.0     No comments   

Issue

After using insertNewRowBefore method from the PHPExcel 1.8.0 library, the cell references defined in the active sheet (i.e. sheet1) are correctly updated. However the cell references from the other sheets (e.g. sheet1!A10) remain unchanged.

Is there a way to update them as well?


Solution

No there isn't.

The logic that updates the cell references in the same worksheet is heavily intensive and slow, and we implemented a trade-off rather than execute it for all worksheets, adding a very big overhead. It can be executed manually using an adaptation of the logic from the PHPExcel_ReferenceHelper::insertNewBefore() and related methods



Answered By - Mark Baker
Answer Checked By - Gilberto Lyons (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

1,260,978

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © 2025 PHPFixing