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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFCONTENT (Excel) and data formatting problem

Status
Not open for further replies.

ilovetorun

Programmer
Jun 4, 2001
5
US
Hey all,

I'm using CFCONTENT to return an Excel spreadsheet to the user. However, some of the data which becomes the Excel file is either 1) Numeric, or 2) Date-masked. The problem is, that Excel is too smart for its own good, and displays the data in ways which are different than what the browser displays.

For instance, I have a part number which is 01-6583. This is just a text string, but Excel transforms that into a number (however many days 1/1/6853 is after 1/1/1900) and then date-formats it as 01-83. Problem is, copying the data from Excel doesn't yield the correct data, which is 01-6583.

I have a similar problem with numbers. I have a part number of 9872176383, and Excel decides to display that as 9.87e9. This is, needless to say, confusing for my users.

Have any of you found a way to force Excel to take all data as text, and not try to format it 'intelligently'?

Thanks!

ilovetorun
 
Hmm, this more of a microsoft office question. But i think i can help. In Excel 2000 and up you can tell excel to store as text or as a converting field to text and double clicking the field. This will give you a pop-up marker next to it to allow you different options for that data. Not sure if its the same for earlier versions.

-jason
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top