导出到Microsoft Excel(2007)时,ColdFusion(9)在数字后神秘地删
发布时间:2020-12-13 20:29:10 所属栏目:Windows 来源:网络整理
导读:以下是一些示例的代码片段: 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,
以下是一些示例的代码片段:
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-server-2012-r2 – 远程桌面网关MMC在“监控”下没
- winapi – WIN32上struct __stat64和struct _stati64有什么
- windows-7 – 为什么停止chkdsk坏?
- windows – 有哪些好的免费软件可用于备份几台PC?
- 09、组策略之软件分发(04)
- windows – 我在哪里可以看到EXE程序的调用(包括参数)?
- window10 mysql服务安装
- windowsformshost mouse event not transmit to it's p
- winapi – 使用Windows API检测所有连接的显示器
- WINDOWS 32位与64位系统的编程差异
推荐文章
站长推荐
- windows – 如何获取安装目录?
- 如何使用命令行清除Windows事件日志?
- 【你好,windows】Win10 x64 1709 X64企业G纯净版
- 来自titan 1.0.0的gremlin在Windows上没有开箱即
- 如何从命令行安装Windows更新
- windows-server-2008-r2 – 如何在Windows Web服
- windows-server-2008-r2 – wbinfo -u不显示AD用
- windows下安装php的memcache模块的方法
- microsoft-band – Microsoft Health API:获取帐
- .net – Windows XP的Windows Identity框架
热点阅读