Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question

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

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

add comment

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

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

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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