导出到Microsoft Excel(2007)时,ColdFusion(9)在数字后神秘地删除字符“D”和“F”

以下是一些示例的代码片段:
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");

<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)#"/>

问题是“4D”和“4F”(而不是其他人)失去了’D’和’F’并被格式化为数字.

我试过这个:

formatText = StructNew();
formatText.dataformat="@";
SpreadsheetFormatColumns(theSheet,formatText,"1-10");

我确认这将Excel中的格式设置为“文本”,但现在我只看到文本格式单元格中的数字4!我也试过使用’字符,但是当它在Excel中打开时,它只显示’而不是字面化单元格.

这很奇怪;有谁知道发生了什么?

似乎解决方法是将单元格公式设置为文字“4D”.
theSheet = SpreadsheetNew("Rates",4J");
SpreadsheetSetCellFormula(theSheet,"""4D""",1,4);
SpreadsheetSetCellFormula(theSheet,"""4F""",6);
SpreadsheetAddRow(theSheet,4F4");

我仍然不知道为什么会发生这种情况,但我的想法是SpreadsheetAddRow()和SpreadsheetSetCell()将4D和4F解释为数字并解释D和F以及代表Double和Float的后缀,并在之后将它们删除转换.

您可以转到https://bugbase.adobe.com/index.cfm将错误提交给Adobe.

相关文章

windows无法连接到wifi怎么办
文章浏览阅读2.2k次,点赞6次,收藏20次。在我们平时办公工作...
文章浏览阅读1k次。解决 Windows make command not found 和...
文章浏览阅读3.2k次,点赞2次,收藏6次。2、鼠标依次点击“计...
文章浏览阅读1.3w次。蓝光版属于高清版的一种。BD英文全名是...
文章浏览阅读974次,点赞7次,收藏8次。提供了更强大的功能,...