1

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

2 Answers 2

2

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

1
  • thank's for the help, but it do nothing
    – Gold
    Dec 29, 2009 at 15:52
0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .