g_johnson
asked on
VS 2003 C# -- writing to Excel
From C# (VS 2003) I am writing to an Excel Spreadsheet using techniques like this:
range.get_Offset(l,0).set_ Value(Miss ing.Value, "Account Number");
range.get_Offset(l,1).set_ Value(Miss ing.Value, "Managemen t Group");
range.get_Offset(l,2).set_ Value(Miss ing.Value, "Customer Type");
range.get_Offset(l,3).set_ Value(Miss ing.Value, "Customer Date of Birth");
range.get_Offset(l,4).set_ Value(Miss ing.Value, "Customer Name");
and
range.get_Offset(l,3).Enti reColumn.N umberForma t = "MM/DD/YYYY";
The spreadsheet ends up with 63 columns.
Before saving, I would like to adjust the column width for each column to match the size of the data written to it. If possible I would like to emulate the Excel process whereby you select all columns and double-click on a border to automatically adjust them. If that's not possible, I would need to adjust each column manually.
How do I accomplish this?
range.get_Offset(l,0).set_
range.get_Offset(l,1).set_
range.get_Offset(l,2).set_
range.get_Offset(l,3).set_
range.get_Offset(l,4).set_
and
range.get_Offset(l,3).Enti
The spreadsheet ends up with 63 columns.
Before saving, I would like to adjust the column width for each column to match the size of the data written to it. If possible I would like to emulate the Excel process whereby you select all columns and double-click on a border to automatically adjust them. If that's not possible, I would need to adjust each column manually.
How do I accomplish this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER