开发者

Excel: Inserting data and not autoformat in vba

开发者 https://www.devze.com 2022-12-26 11:05 出处:网络
The data I am trying to insert is from a database, and while inserting开发者_如何学Python the data it gets auto formatted to scientific format, is it possible not to auto format it? I don\'t want it t

The data I am trying to insert is from a database, and while inserting开发者_如何学Python the data it gets auto formatted to scientific format, is it possible not to auto format it? I don't want it to be in scientific format but in text format

Example that gets auto formatted: 20.E01


Format the worksheet columns to the appropriate excel type before you assign cell values:

Columns("A:A").NumberFormat = "0.00"

Or to be quick and dirty prefix everything with a ' to have it interpreted as text.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号