View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Prevent scientific formatting when creating excel sheet from vbscr

Format the column to Text before placing the text

Range("A:A").NumberFormat = "@"

If this post helps click Yes
---------------
Jacob Skaria


"programinfinity" wrote:

Hi,
I'm trying to create an excel sheet using html <table tags from vbscript.
One of the columns contains numbers 14 digits long. On opening the file
created it shows the numbers as 2.3024E+13.
I tried adding an apostrophe ( ' ) before the number. But sadly the
apostrophe also shows on the excel sheet.
How can I prevent the number to convert to scientific format and display all
14 digits either as number or text?

Thanks in advance,
programinfinity