Accessing Name manager

Topics: Developer Forum, User Forum
May 31, 2013 at 11:40 AM

I am using PHPExcel and am trying to write some code to take an Excel Spreadsheet and produce some PHP code from it that represents the fields and drop-down lists including tooltips etc.

So far it has been going quite well and I have the bulk of it working but I have hit a snag. The source spreadsheet I am working with has a number of cells that have restricted input which are in the form of drop-down lists. They all make reference to ranges of other cells that contain the items for the drop-down. But here is the snag: All the references are in the form of Names (e.g. AD_country_list) rather than the actual range. in Excel I can see what these lists contain by going to the Name Manager in the Formulas tab. I can get the names the drop-down cells are using via the getFormula1 call on the data validation object for the cell. But I am then stuck. I cannot find a way to look up the cells containing the list data from the name.

Any ideas?


May 31, 2013 at 2:56 PM
If you need to know the cells for a name, PHPExcel_NamedRange::resolveRange() can help you.
Aug 14, 2013 at 12:18 PM
if you really want to get your name manager formulas then just use this add-in for excel which will export all your name manager functions/code/formulas/defined variables in another sheet and use those new reff instead of those from name manager...that's how got it fixed for a 2Mb excel file to be imported in phpexcel