T
T
Tr1mp2019-09-21 11:17:04
PHP
Tr1mp, 2019-09-21 11:17:04

How to get cell address in Excel?

There is a file, it has hundreds of lines, a little less columns, having received the word "price" as an input, for example, in response, I should receive not the contents of the cell where the word "price" is located, but the address itself, for example: "D50". Why is an address needed? Because in this document this word "price" may be half a hundred, but I need exactly the one that comes after the word, for example, "computer" or "monitor". That is, from the beginning I get the address of the cell from the "computer", for example "B40" Next, I search through the search for the word "total" which comes after line 40, but it "price" is always enclosed in the "D" column, so just when iterating it will be possible to compare the number, if it goes up to line 40, then we forget, if after, then we save,
How to implement this, and what is better? I'm thinking PHPoffice/PhpSpreadsheet or is there something better/easier?
Thanks to everyone who helps.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pychev Anatoly, 2019-09-21
@pton

it all depends on the needs and knowledge.
If you are familiar with PhpSpreadsheet then go for it.
If you need the result in the same file, then you need to do it with a VBA macro. Access to VBA is built into the office package. The language is simple. The net is full of information.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question