ColdFusion (9) mysteriously removes characters 'D' and 'F' after numbers when exporting to Microsoft Excel (2007) -


here's code snippets example:

thesheet = spreadsheetnew("rates","true"); spreadsheetaddrow(thesheet,"4a,4b,4c,4d,4e,4f,4g,4h,4i,4j"); spreadsheetaddrow(thesheet,"4k,4l,4m,4n,4o,4p,4q,4r,4s,4t"); spreadsheetaddrow(thesheet,"4u,4v,4w,4x,4y,4z,4d4,4f4"); 

and

<cfheader name="content-disposition" value="attachment; filename=#gettickcount()#.xlsx"> <cfheader name="expires" value="#now()#"> <cfcontent type="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" variable="#spreadsheetreadbinary(thesheet)#"/> 

the issue "4d" , "4f" (and not others) lose 'd' , 'f' , formatted number.

i tried this:

formattext = structnew(); formattext.dataformat="@"; spreadsheetformatcolumns(thesheet,formattext,"1-10"); 

i verified set format in excel "text", see number 4 in text-formatted cell! tried using ' character, when opens in excel, shows ' instead of literalizing cell.

this rather strange; have idea what's going?

it seems workaround set cell formula literal "4d".

thesheet = spreadsheetnew("rates","true"); spreadsheetaddrow(thesheet,"4a,4b,4c,,4e,,4g,4h,4i,4j"); spreadsheetsetcellformula(thesheet, """4d""", 1, 4); spreadsheetsetcellformula(thesheet, """4f""", 1, 6); spreadsheetaddrow(thesheet,"4k,4l,4m,4n,4o,4p,4q,4r,4s,4t"); spreadsheetaddrow(thesheet,"4u,4v,4w,4x,4y,4z,4d4,4f4"); 

i still don't know why happening, idea spreadsheetaddrow() , spreadsheetsetcell() interpreting 4d , 4f numeric , interpreting d , f , suffixes standing double , float, , stripping them out after conversion.

you can submit bug adobe going https://bugbase.adobe.com/index.cfm.


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -