I am exporting data to an excel file. This works, however, one of my columns doesn't format properly with currency. Through code, how can i make an entire column currency just like when i do it through Excel itself, by going to the format options.

I have tried using the Range.NumberFormat, but that only works when value matches my data exactly.

IE: I have 24500.00 and 20000

I want them to show 24,500.00 and 20000.00

Sometimes i get ###### in the column after the export and when i change the option in excel for that column, it works fine. Any ideas? Thanks.

7 Years
Discussion Span
Last Post by jbrock31

The ####### in an Excel cell indicates that the data is too big to display in the cell.
I think your problem is not the text formatting but the column width.


I meant to come back on and update this thread yesterday. You are exactly correct. My formatting was fine, i just needed to set the column width. Once i did that, the export was perfect. Thanks for the response.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.