sheetjs
sheetjs copied to clipboard
how to change the format of col from general to text so i can keep leading zeros in mobile number
@SheetJSDev Do you have any solution to this? I get from excel for the number 90887 with format 0000000 (7 zeroes making it look like 0090887):
{
s: {patternType: "none"},
t: "n",
v: 90887,
w: "90887",
z: "General"
}
using XLSX.read. If there were a field that could give me excel's custom format, that would probably fix it.
Pass a string:
{ t: "s", v: "0090887" }
OR use a number format:
{ t: "n", v: 90887, z: "0000000" }
The z key is the number format that you would specify in Excel