Forum


Replies: 1   Views: 250
Cell formatting for replacevariablebytext
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpxlsx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpxlsx version and check the Documentation available.

Posted by admin  · 03-02-2023 - 12:58

Hello,

The replaceVariableByText method only replaces placeholders, but it doesn't allow setting new styles. A method that need to be developed will support this task.

Regarding the other question, there's no direct method to find the cell position of a specific content. But you can use getCellPositions to return all cell positions in the active sheet and then iterate the array returned by this method with getCell to get that information. getCell returns an array with the following information:

* @return array|null
     *      'function' (string)
     *      'sharedString' (string)
     *      'type' (string)
     *      'value' (string)

Regards.