A
A
Andrey2015-10-08 14:45:12
PHP
Andrey, 2015-10-08 14:45:12

How to bypass xls file allowable by PHPExcel parser with non-fixed number of vertical fields?

Let's say there is a file:
--->
Category name
description
product 1 10 | 23 | 34 | 90
item 2 10 | 43 | 14 | 10
product 3 10 | 43 | 14 | 10 Product
category name
1 10 | 23 | 34 | 90
item 2 10 | 43 | 14 | 10
item 3 10 | 43 | 14 | 10
item 4 10 | 43 | 14 | 10
product 5 10 | 43 | 14 | 10
product 6 10 | 43 | 14 | 10
Category name
description
yet unexpected description
product 1 10 | 23 | 34 | 90
--->
i.e. parsing horizontally is not difficult, but how to do it correctly with a non-fixed vertical length.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2015-10-08
@andreyk0

Look at the first cell of the line and, based on its contents, determine whether it is a product or just text. Your CO.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question