Excel doesn't apply formatting via automation

N

NeilG

Hope I'm posting to the right place.

I've got a vb.net application that is exporting a datagridview to excel.
I first create the header row and apply the correct number format to each
column.
Then I convert the data to an array and drop it into the worksheet using a
range.

This works great...but the formatting isn't applied.
If I enter a specific cell and then hit enter manually after the spreadsheet
is created, the formatting gets applied correctly. Is there anyway I can
force it to re-examine and re-apply formatting via automation?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top