如何确保我的Excel单元格将被视为字符串? [英] How can I ensure that my Excel cell will be treated as a string?
本文介绍了如何确保我的Excel单元格将被视为字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用Coldfusion创建一个基本的Excel电子表格。我构建一个表,然后使用以下代码将其转换为Excel:
I am using Coldfusion to create a basic Excel spreadsheet. I build a table, and then convert it to Excel using the following code:
<cfset fileName = "myFile.xls">
<CFHEADER NAME="Content-Disposition" VALUE="attachment; filename=#fileName#">
<cfcontent type="application/msexcel" reset="true">
<cfoutput>#myExcel#</cfoutput>
myExcel变量保存一个HTML表。
The "myExcel" variable holds an HTML table.
我的问题是,一些单元格包含值如:281E47。哪个Excel然后翻译为2.81E + 49。如何在我的HTML表中指定要将这些值逐字显示为文本,而不是转换为数字?
My problem is that some of the cells contain values such as: 281E47. Which Excel is then translating to 2.81E+49. How can I specify, in my HTML table, that I want these values to be displayed literally, as text, rather than converted into a number?
推荐答案
这个回答对另一个线程为我工作:
This answer to another thread worked for me:
这篇关于如何确保我的Excel单元格将被视为字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文