how to open Excel,

and that the cell's styling will be Number with no numbers after the dot (.)

for example: the number 1234567890 will show 1234567890 not 1.23E+09

thank's in advance

link|improve this question

66% accept rate
feedback

migrated from stackoverflow.com Dec 31 '09 at 1:10

This question came from our site for professional and enthusiast programmers.

2 Answers

If the number format of the cells are correctly set already, you can do this using the AutoFit command.

Worksheet worksheet = (Worksheet)workbook.ActiveSheet;
Range usedRange = worksheet.UsedRange;
usedRange.Columns.AutoFit();

Have a look here

How to automate Microsoft Excel from Microsoft Visual C# .NET

link|improve this answer
thank's for the help, but it do nothing – Gold Dec 29 '09 at 15:52
feedback

you can read excel file like an access database with OleDB. then you can fill data into DataTable and work with it.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.