数据表优秀的问题 [英] data table to excel problem
本文介绍了数据表优秀的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
见下面的情景并给我建议。
oDt.Rows( 0)(0)= 22.22.100
xlb.Worksheets(1).Cells(0,0).Value = oDt.Rows(0)(0写完excel表后,
此单元格有xlb.Worksheets(1).Cells(0 ,0)= 22.22.1
i想要
xlb .Worksheets(1).Cells(0,0)= 22.22.100
谢谢提前。
hello all,
see following scenario and give me suggestion .
oDt.Rows(0)(0)= "22.22.100"
xlb.Worksheets(1).Cells(0, 0).Value = oDt.Rows(0)(0)
after writting excel sheet
this cell has xlb.Worksheets(1).Cells(0, 0) = "22.22.1"
i wants
xlb.Worksheets(1).Cells(0, 0) = "22.22.100"
thanks in advance.
推荐答案
使用objExcel
.Columns(A:A)。选择
。 Selection.NumberFormat =0.00'设置数字格式
.Columns(B:B)。选择
.Selection.NumberFormat =@'来设置文字格式
结束
objExcel的类型为Excel.Application
With objExcel
.Columns("A:A").Select
.Selection.NumberFormat = "0.00" ' to set number format
.Columns("B:B").Select
.Selection.NumberFormat = "@" ' to set text format
End With
objExcel has type "Excel.Application"
这篇关于数据表优秀的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文