json-to-csv-export icon indicating copy to clipboard operation
json-to-csv-export copied to clipboard

Adding sep= to the top of file to help with opening csv files

Open mathijsfr opened this issue 1 year ago • 2 comments

When adding a delimitter as follows:

const dataToConvert = {
    data: result,
    filename: `${props.name}.csv`,
    delimiter: ';',
    headers: Object.keys(result[0])
  }

The delimitter should be added at the top of the file to help with opening it.

image

mathijsfr avatar Mar 14 '23 12:03 mathijsfr

#51

mathijsfr avatar Mar 14 '23 13:03 mathijsfr

Hey @mathijsfr, thank you for the pull request and opening this issue. The solution here causes some compatibility issues with basic csv views (non-excel.) See the image below of when one opens the csv with Apple Numbers.

image

coston avatar Jul 13 '23 21:07 coston