ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   column format as text (https://www.excelbanter.com/excel-programming/290712-column-format-text.html)

Sumesh[_2_]

column format as text
 
Hi
I am using vb.net and excel automation to copy a dataset from my window app
to excel. I copy the data to the clipboard and then paste into an excel
worksheet in a particular range. The problem I have is that one of my
columns contains phone numbers in the following format +4478106356546.
Because of the "+" all the numbers in that column is displayed something
like 4.47811E+15. I would like to format that column and tell it display
it's values as text. How do I do this? Would be great if I could see a
sample.

Thanks
Sumesh



Tom Ogilvy

column format as text
 
Columns(2).Numberformat = "@"
do the paste

--
Regards,
Tom Ogilvy

"Sumesh" wrote in message
...
Hi
I am using vb.net and excel automation to copy a dataset from my window

app
to excel. I copy the data to the clipboard and then paste into an excel
worksheet in a particular range. The problem I have is that one of my
columns contains phone numbers in the following format +4478106356546.
Because of the "+" all the numbers in that column is displayed something
like 4.47811E+15. I would like to format that column and tell it display
it's values as text. How do I do this? Would be great if I could see a
sample.

Thanks
Sumesh





Sumesh[_2_]

column format as text
 
....Thanks for the help

Sumesh
"Tom Ogilvy" wrote in message
...
Columns(2).Numberformat = "@"
do the paste

--
Regards,
Tom Ogilvy

"Sumesh" wrote in message
...
Hi
I am using vb.net and excel automation to copy a dataset from my window

app
to excel. I copy the data to the clipboard and then paste into an excel
worksheet in a particular range. The problem I have is that one of my
columns contains phone numbers in the following format +4478106356546.
Because of the "+" all the numbers in that column is displayed something
like 4.47811E+15. I would like to format that column and tell it display
it's values as text. How do I do this? Would be great if I could see a
sample.

Thanks
Sumesh








All times are GMT +1. The time now is 02:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com