Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Format whole column with numeric values #1339
Comments
Are you sure the cells are numeric? As a quick test, add the line if(!worksheet[ref]) continue;
+ console.log(worksheet[ref].t);
if(worksheet[ref].t != 'n') continue; ... and verify you are seeing a string of |
If there is formatted text, utilities will use the cached values. Delete the formatted text as follows: if(worksheet[ref].t != 'n') continue;
+ delete worksheet[ref].w;
worksheet[ref].z = fmt; |
That's not working either and if you ask me, I understand why. worksheet[ref] is not defined, so you also can't delete it. The error must be somewhere earlier in the code, where worksheet[ref] is defined? |
@SheetJSDev Still looking for a solution! |
Please, still looking for help @SheetJSDev |
@sonjadeissenboeck A little late, and I'm sure you already checked this, but I don't see where you are defining 'worksheet'. You need to add something like this
|
I tried to add a formatter to my table columns that applies a new format to numeric cells. I used this #885 issue as a guide to my solution but it didn't seem to work.
Here's what I have:
When I debug this code, I see that worksheet[ref] is "undefined". Even though ref itself is not undefined (e.g. it's "NIAYPRLSVBUYWS15") and my worksheet is also filled with the correct data.
Am I doing something wrong?
Thanks in advacne!
Note I'd like to apply that format AFTER the table has been rendered!