How to expand column if data in cell exceed?

C

chandan

Hi All,
I am writing in Excell using Excel Introp(COM Dll).I had try to find
expand function.But did not get there. Is there any programatic way to
expand the column while I writing in the excel when data in cell
exceed the widht of the cell.
I am using C# and VS2008 web application.

Thanks,
Chandan kumar
 
L

Leon

Microsoft.Office.Interop.Excel.WorksheetClass sheet =
new Microsoft.Office.Interop.Excel.WorksheetClass();

sheet.Columns.AutoFit();
 
Top