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!

formatting in Excel

Status
Not open for further replies.

mns9939

Programmer
Nov 21, 2001
19
US
Hi,
I have a perl-cgi script running from web, which has an output option to Excel. I use the following line to display the output in Excel.
"print header(-type=>'application/vnd.ms-excel');"

How ever, the problem is when i have a value like '10-04',
the output in Excel shows as 'April-10'. It recognizes as a date field though it is a character value.

My question is, how do i make Excel to accept all values as text values and not do any formatting for those values?

Thanks,
Madhu
 
This should work:

BEFORE merging the data, click on the column letter (to select the entire column). Then use "Format Cells", and choose "Text".

Regards, ...Dale Watson dwatson@bsi.gov.mb.ca
 
Dreamboat,
Thanks for your reply. If i use an apostrophe ', it solves the formatting problem. However, all the columns will have a ' in front. Is there a way to hide the apostophe from displaying?

Thanks,
Madhu
 
mns,
IIRC, ' specifies left justified text. " specifies right justified text and ^ specifies centered text.

Imagineer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top