数字到字符串 [英] number to string

查看:103
本文介绍了数字到字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




当我从txt或csv文件中选择一个字段并在ASP上显示时,条形码数量为16

位数( 9876543210123456)变为9.87654321012345E + 15.

如何让它显示原件。谢谢


Atse

解决方案

你好吗?选择它和显示它?


雷在家


" atse" <杜****** @ yahoo.com>在消息中写道

新闻:ou ******************** @ news02.bloor.is.net.ca ble.rogers.com。 ..



当我从txt或csv文件中选择一个字段并在ASP上显示时,
16位数的条形码编号(9876543210123456) )变为
9.87654321012345E + 15。如何让它显示原件。谢谢

Atse



源代码

<%

''传递位于C中的文件的文件名:\ upload \

file = Request.QueryString(" file")


con_xls =" Provider = Microsoft.Jet.OLEDB.4.0; Data

Source = C:\upload \\ test.xls; Extended

属性="" Excel 8.0; HDR =是; IMEX = 1"""

set conn = server.CreateObject(" ADODB.Connection")

conn.open(con_xls)


set rs = conn.execute(" select * from"& file)


% >

< HTML>

< HEAD>

< META NAME =" GENERATOR" Content =" Microsoft Visual Studio 6.0"

< / HEAD>

< BODY>

< table border = 1>

<%

如果不是rs.eof那么

%>

<%do直到rs.EOF%>

< tr>

<%

''此文件中有16列,但我不知道如何定义列数的

变量


for i = 0到15

% >

< td> <%= rs(i)%> < / td>

<%next%>

< / tr>

<%rs.MoveNext

循环


结束如果

%>

< / table>

< / BODY>

< / HTML>


" Ray at<%= sLocation%>" < myfirstname at lane 34。 KOMM>在留言中写道

新闻:%2 **************** @ TK2MSFTNGP12.phx.gbl ...

怎么样你选择它和显示它呢?

Ray在家里

atse <杜****** @ yahoo.com>在消息中写道
新闻:ou ******************** @ news02.bloor.is.net.ca ble.rogers.com ...



当我从txt或csv文件中选择一个字段并显示在ASP上时,


16

条形码的数字(9876543210123456)变为


9.87654321012345E + 15.

如何让它显示原件。谢谢

Atse




在我看来,如果您在Excel中格式化单元格以显示
$ b,那么您可以通过RS直接显示

的唯一方法$ b数字为文字。


雷在家


" atse" <杜****** @ yahoo.com>在消息中写道

新闻:lv ******************* @ news04.bloor.is.net.cab le.rogers.com .. 。

源代码
<%
''传递位于C:\upload \
file = Request.QueryString的文件的文件名( 文件)

con_xls =" Provider = Microsoft.Jet.OLEDB.4.0;数据
Source = C:\upload \\ test.xls; Extended
Properties ="" Excel 8.0; HDR = Yes; IMEX = 1"""
set conn = server.CreateObject(" ADODB.Connection")
conn.open(con_xls )

设置rs = conn.execute(" select * from"& file)

%>
< HTML>
< HEAD>
< META NAME =" GENERATOR" Content =" Microsoft Visual Studio 6.0"
< / HEAD>
< BODY>
< table border = 1>
<%
如果不是rs.eof那么
%>
<%do,直到rs.EOF%>
< tr>
<%
''这个文件中有16列,但我不知道如何定义列数的

对于i = 0到15
%>
< td> <%= rs(i)%> < / td>
<%next%>
< / tr>
<%rs.MoveNext
循环

结束如果
%>
< / table>
< / BODY>
< / HTML>

" Ray at<%= sLocation%GT;" < myfirstname at lane 34。 KOMM>在消息中写道
新闻:%2 **************** @ TK2MSFTNGP12.phx.gbl ...

你好吗选择 ;它和显示它呢?

Ray在家里

atse <杜****** @ yahoo.com>在消息中写道
新闻:ou ******************** @ news02.bloor.is.net.ca ble.rogers.com ...



当我从txt或csv文件中选择一个字段并在ASP上显示时,


16

条形码编号的数字(9876543210123456)变为


9.87654321012345E + 15.

如何让它显示原本的。谢谢

Atse





Hi,

When I select a filed from a txt or csv file, and display on the ASP, the 16
digit of barcode number (9876543210123456) becomes to 9.87654321012345E+15.
How can I make it display the original. Thanks

Atse

解决方案

How are you "selecting" it and "displaying" it?

Ray at home

"atse" <du******@yahoo.com> wrote in message
news:ou********************@news02.bloor.is.net.ca ble.rogers.com...

Hi,

When I select a filed from a txt or csv file, and display on the ASP, the 16 digit of barcode number (9876543210123456) becomes to 9.87654321012345E+15. How can I make it display the original. Thanks

Atse



the source code
<%
'' pass the filename of a file located in C:\upload\
file=Request.QueryString("file")

con_xls="Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\upload\\test.xls;Extended
Properties=""Excel 8.0;HDR=Yes;IMEX=1"""
set conn=server.CreateObject("ADODB.Connection")
conn.open(con_xls)

set rs = conn.execute ("select * from " & file)

%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<table border=1>
<%
if not rs.eof then
%>
<% do until rs.EOF %>
<tr>
<%
'' there are 16 columns in this file, but I don''t know how to define a
variable of the number of columns

for i =0 to 15
%>
<td> <%= rs(i)%> </td>
<%next%>
</tr>
<% rs.MoveNext
loop

end if
%>
</table>
</BODY>
</HTML>

"Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...

How are you "selecting" it and "displaying" it?

Ray at home

"atse" <du******@yahoo.com> wrote in message
news:ou********************@news02.bloor.is.net.ca ble.rogers.com...

Hi,

When I select a filed from a txt or csv file, and display on the ASP,

the 16

digit of barcode number (9876543210123456) becomes to


9.87654321012345E+15.

How can I make it display the original. Thanks

Atse




It seems to me that the only way that you can get this to display directly
from the RS the way you want is if you format the cell in Excel to display
the number as text.

Ray at home

"atse" <du******@yahoo.com> wrote in message
news:lv*******************@news04.bloor.is.net.cab le.rogers.com...

the source code
<%
'' pass the filename of a file located in C:\upload\
file=Request.QueryString("file")

con_xls="Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\upload\\test.xls;Extended
Properties=""Excel 8.0;HDR=Yes;IMEX=1"""
set conn=server.CreateObject("ADODB.Connection")
conn.open(con_xls)

set rs = conn.execute ("select * from " & file)

%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<table border=1>
<%
if not rs.eof then
%>
<% do until rs.EOF %>
<tr>
<%
'' there are 16 columns in this file, but I don''t know how to define a
variable of the number of columns

for i =0 to 15
%>
<td> <%= rs(i)%> </td>
<%next%>
</tr>
<% rs.MoveNext
loop

end if
%>
</table>
</BODY>
</HTML>

"Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...

How are you "selecting" it and "displaying" it?

Ray at home

"atse" <du******@yahoo.com> wrote in message
news:ou********************@news02.bloor.is.net.ca ble.rogers.com...

Hi,

When I select a filed from a txt or csv file, and display on the ASP,


the

16

digit of barcode number (9876543210123456) becomes to


9.87654321012345E+15.

How can I make it display the original. Thanks

Atse





这篇关于数字到字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆