0

How to add "=image()" formula in $stream->writeCsv() CSV export?

Please help me I want to keep formula while export csv file.

Thanks in advance.

1 Answer 1

1

I got the answer. We can not able to add formula in CSV file because of Magento2 add ' '(Empty space) where add ('=', '+', '-').

Check the bellow file path and code you will get it.

vendor/magento/framework/Filesystem/Driver/File.php:757

if (isset($value[0]) && in_array($value[0], ['=', '+', '-'])) {
    $data[$key] = ' ' . $value;
}

Because of Security enhancement for CSV data processing by Excel-like applications.

Thanks,

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.