Search code examples
excelcoldfusioncfspreadsheet

cfspreadsheet with large numbers needs to be formatted as a string


I have 16 digit number that needs to show all the digits. If I just key it into Excel I can put a ' in front of the number and it keeps the number from going into scientific notation. When I do the same in <cfspreadsheet> I get the number with a ' in front of it. I have also tried to use cell formatting:

<cfscript>
variables.hugenumber = {

color="dark blue;", 
dataformat = "0"
};
</cfscript> 

Which doesn't help either


Solution

  • It turns out that a format like this is needed:

    <cfscript>
    variables.hugenumber = {
    
    color="dark blue;", 
    dataformat = "################"
    };
    </cfscript>