Add this at your TODO point:
aRange.Columns.AutoFit();
More Related Contents:
- HRESULT: 0x800A03EC on Worksheet.range
- Fastest method to remove Empty rows and Columns From Excel Files using Interop
- Export the dataGridView to Excel with all the cells format
- Closing Excel Application Process in C# after Data Access
- Cannot close Excel.exe after Interop process
- Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE))
- Microsoft Office Excel cannot access the file ‘c:\inetpub\wwwroot\Timesheet\App_Data\Template.xlsx’
- Why does Microsoft.Office.Interop.Excel.Application.Quit() leave the background process running?
- How do I import from Excel to a DataSet using Microsoft.Office.Interop.Excel?
- extract image from word file
- Optimal way to Read an Excel file (.xls/.xlsx)
- Moq & Interop Types: works in VS2012, fails in VS2010?
- Accessing an open Excel Workbook in C#
- Search SQL by date ASP.NET
- Get Enum from Description attribute [duplicate]
- Edit a specific Line of a Text File in C#
- How to Get IP Address?
- Has foreach’s use of variables been changed in C# 5?
- How do I convert Unicode escape sequences to Unicode characters in a .NET string?
- POSTing JSON to URL via WebClient in C#
- How do I upload a file to an SFTP server in C# (.NET)? [closed]
- Compare nullable types in Linq to Sql
- Serialize a Bitmap in C#/.NET to XML
- Declaration of Anonymous types List [duplicate]
- How do I use a C# Class Library in a project?
- Serialize as NDJSON using Json.NET
- Registry Watcher C#
- Dependency Injection with classes other than a Controller class
- Select distinct rows from datatable in Linq
- C# how to use WM_GETTEXT / GetWindowText API / Window Title