Hi everyone,
I’ve run into a formatting issue with CSV files generated from my Shopify app, and I’m hoping someone has run into this before or knows the best practice to handle it.
Here’s what’s happening:
The CSV file is generated programmatically from my app (Node.js backend).
On Windows, when opened with Excel or any CSV viewer, the file displays perfectly — all columns, including the Variant GID column, show correct string values like:
gid://shopify/ProductVariant/123456789
However, on Mac, when opening the same CSV in Numbers, the app automatically interprets the Variant GID column as a numeric field.
It removes quotes and/or converts the value into scientific notation (e.g., 1.23457E+11),
resulting in incorrect or truncated GID values.
This breaks the data integrity when the merchant tries to re-upload or process the CSV.
What I’ve Tried
Wrapping the GID values in quotes (“gid://shopify/ProductVariant/123456789”).
Escaping special characters and ensuring UTF-8 encoding.
Adding a prefix (like =‘gid://…’), but that causes issues when re-importing or parsing back in Node.js.
Question
What’s the best practice or reliable workaround to ensure CSV files maintain consistent formatting across Windows (Excel) and Mac (Numbers) — specifically so Shopify GID values remain as text and are not auto-converted to numbers or scientific notation?
Any recommendations or known strategies used in other Shopify apps would be very helpful.