R
R
raw12017-10-16 14:05:43
PHP
raw1, 2017-10-16 14:05:43

How to modify xls file?

Good afternoon, there is an array of data

$data (
    array(
        'id_product' => 1,
        'src' => товар1
    )
    array(
        'id_product' => 2,
        'src' => товар2
    )
    array(
        'id_product' => 3,
        'src' => товар3
    )
)

It is necessary to read the xlsx file and, if id_product matches, insert it into the table in the src image column.
How can this be done?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
x67, 2017-10-16
@x67

  • vba
    In the first case, you will need regular expressions. They are in vba, but I don't know how they work, so if the structure is constant, you can use the split() function to get the field names and their values. Knowing the name is already easy to open the file. But you need to be able to program - as a language it is simple, but you need to understand a little OOP and google.
    You can also try inserting data into an excel sheet. If nothing moves out, the macro will be greatly simplified - it will only be necessary to check the cells and insert a file with a specific name

E
Exploding, 2017-10-16
@Exploding

I assume that the ideal option would be:
- go to phpclasses.org
- find a suitable implementation for working with excel
- presumably you know how to work with arrays
- complete the task!
Will it go?)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question