?
Solved

Convert integer to string

Posted on 2014-07-30
7
Medium Priority
?
199 Views
Last Modified: 2014-07-31
Hi,

How can I convert from integer to string?

I have to convert this: 
#ToString(QSearchResult.ASABySecs)#  

This is integer in the database: QSearchResult.ASABySecs




<cfif isdefined('QSearchResult.ASABySecs')> 
<Cell ss:StyleID="Detail">
<Data ss:Type="String">#ToString(QSearchResult.ASABySecs)# </Data>
</Cell>
</cfif>

Open in new window


Thanks,
Lulu
0
Comment
Question by:lulu50
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 6

Expert Comment

by:rjohnsonjr
ID: 40230166
Looks great to me.

https://wikidocs.adobe.com/wiki/display/coldfusionen/ToString

Are you having an issue?
0
 
LVL 39

Expert Comment

by:gdemaria
ID: 40230177
Excel will automatically interpret values in a cell as a number if they look like a number, but you had the correct command.   What is it doing that you don't like?

<Data ss:Type="String">
0
 

Author Comment

by:lulu50
ID: 40231408
Because the field is stored as a int but I have it exported to excel as string <Data ss:Type="String">

It gives me the yellow excel error.

Please take a look at the attached image.
0
The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

 

Author Comment

by:lulu50
ID: 40231409
0
 
LVL 6

Accepted Solution

by:
rjohnsonjr earned 2000 total points
ID: 40231455
I opened up excel created a document and saved it as an xml 2003 document.  I changed a column with a number in it to text and here was the generated xml:

  <Cell ss:StyleID="s62"><Data ss:Type="Number">2</Data></Cell>

Open in new window


This: ss:StyleID="s62"  on the cell is what makes the data appear as text and gets rid of the warning when you open the file.
0
 
LVL 39

Expert Comment

by:gdemaria
ID: 40231546
It looks like you want to store it as a number then, not as text.    In your image, the "2" is text and asking you if you want to treat it as a number.   I would think you would want the 2 to be a number, yes?
0
 

Author Closing Comment

by:lulu50
ID: 40231868
Thanks,
0

Featured Post

Quiz: What Do These Organizations Have In Common?

Hint: Their teams ended up taking quizzes, too.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi, I will be creating today a basic tutorial on how we can create a Mail Custom Function and use it where ever we want. The main advantage about creating a custom function is that we can accommodate a range of arguments to pass to the Function and …
Today, I was working on some optimization and spam-stopping techniques when I encountered Ben Nadel's post to reduce spam feature using Math (http://www.bennadel.com/blog/197-How-I-Stop-Spammers-On-My-ColdFusion-Blog.htm). While this method is not o…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question