Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HOW TO CHANGE CELL PROPERTIES IN EXCEL

Status
Not open for further replies.

fluppe689

Programmer
Jul 11, 2008
75
BE
Hello Experts

I made program that is making an excel sheet.
Sor far not problem.
My dbf table exist from 2 columns

column1 c(20)
column2 n(10)

The problem is when in column1 there is
123456789123456789
in the excel cell there find 12345E+8

How can i change the format of the cell into text

wfg,

Filip
 
Set the NumberFormat property of the column. Also why you're asking this question in SQL Server forum, may be you would have better luck in Excel forum?
 
Sometimes a number appearing like 12345E+8 within Excel is not a formatting issue, but merely a column width issue.

I'd suggest that you get a copy of Microsoft Office Automation with Visual FoxPro (
It will teach you how to do a whole host of Office/Excel Automation operations.

Good Luck,
JRB-Bldr
 
Filip,

For what it's worth:
I see your column1 is expecting characters.
If you just enters 123456789123456789 into an excel cell it is expected to be numeric with the result (1,234567E+17) you are facing.
If you put an aposthrope in the cell prior to the numerics excel will treat the cell-contents as character with the result you like to see.

-Bart
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top