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. Image for the cookie policy date

How to format a Excel cell to category "Text"

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!

1 Reply

DT Dongping Tu 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

Loader.
Live Chat Icon For mobile
Up arrow icon