Importing CSV that has line breaks within the actual fields

后端 未结 6 1998
挽巷
挽巷 2021-02-20 08:23

I am using PHP to import a CSV file, which originates from an excel spreadsheet. Some of the fields contain line breaks in them, so when I reopen the csv in excel / open office

6条回答
  •  清酒与你
    2021-02-20 08:55

    The accepted answer didn't solve the problem for me, but I eventually found this CSV parser library on google code that works well for multiline fields in CSV's.

    parsecsv-for-php:
    https://github.com/parsecsv/parsecsv-for-php


    For historical purposes, the original project home was:
    http://code.google.com/p/parsecsv-for-php/

提交回复
热议问题