We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to format a Excel cell to category "Text"

Thread ID:

Created:

Updated:

Platform:

Replies:

20547 Oct 20,2004 02:01 PM Oct 20,2004 02:52 PM Windows Forms 1
loading
Tags: XlsIO
Dongping Tu
Asked On October 20, 2004 02:01 PM

I have a very large number 210020410200001008 in one of the cells, when it got exported to Excel, it gets truncated to 210020410200001000 (NOTE that the last digit become 0 from 8) I check the cell NumberFormat from Excel, it''s defaulted to Generic, how can I change the NumberFormat from Generic to category Text which Excel will display the the cell exactly as entered even the text indeed is a number? Any help will be greatly appreciated!

Dongping Tu
Replied On October 20, 2004 02:52 PM

Never mind. I figured out the solution. Just need to add the following line: sheet.Range[i+1,j+1].Text = grid[i,j].Text; to change the default Generic NumberFormat to category "Text" format. Regards

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;