Skip to content

Problem with JSON convert #56

@PYovchevski

Description

@PYovchevski

Is there some option to show the empty fields in JSON string as empty string.
The problem is that $excel->toString('JSON') skip the empty fields and if I try to get the content of column X, the content type doesn't match with other rows column X content.

For example

image

The output array is:

array(3) {
[0]=> string(?) "Title"
[1]=> string(?) "Quantity"
[2]=> string(?) "Price"
}
array(3) {
[0]=> string(?) "BMW"
[1]=> string(?) "5"
[2]=> string(?) "$192.000"
}
array(2) {
[0]=> string(?) "Mercedes"
[1]=> string(?) "$204.000"
}
array(3) {
[0]=> string(?) "Audi"
[1]=> string(?) "10"
[2]=> string(?) "$150.000"
}

So, when I'm trying to get all quantites result is:

5, $204.000, 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions