TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Lennie Kuah
NA
27
0
C#NET2008 Window Application using SWITCH CASE
Sep 20 2011 4:41 AM
Hullo Friends,
I do neet you help, Please help me.
I do encounter an interesting problem with the C#NET Windown Application using SWITCH CASE in the coding.
In order to format the EXCEL WorkSheet 10 columns which the Column1 - 3 should have the same width.
and Column 5 - 8 should also have the same width.
I am trying to use this coding and it's not working:
int intColumn = 0;
int intRecCount = DR.FieldCount;
For (intColumn = 1 ; intcolumn < - intRecCount; intColumn ++)
(
Switch (intColumn)
{
case 1:2:3:
((Range)xlWrkSheet.Cells[intRow, intColumn]).EntireColumn.ColumnWidth = 13;
break;
case 4:
((Range_xlWrkSheet.Cells[intRow, intColumn]).EntireColumn.columnWidth = 10;
break;
case 5:6:7:8:
((Range)xlWrkSheet.Cells[intRow, intColumn]).EntireColumn.ColumnWidth = 20;
break;
}
}
Thank you for your help.
Cheers,
Lennie Kuah
Reply
Answers (
1
)
Format Textbox
How to convert a HTML to TIFF with C# ?