Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 06, 2012 03:57 PM by smirnov
Member
83 Points
60 Posts
Jan 06, 2012 07:11 AM|LINK
Hi, I need help! :(
I need to write to an excel file in C# but i have to pass a fixed width for each column.
For Example:
Name Length = 30
Address Length = 50
Sex = 1
In my Excel File, it should look like this:
Column A Column B Column C
Jason Anderson 123 Example St. M
Ann Roberts 456 Sample St. F
Thanks!
All-Star
23700 Points
4056 Posts
Jan 06, 2012 03:57 PM|LINK
You can do it using NPOI library.
sheet1.SetColumnWidth(0, 3000); sheet1.SetColumnWidth(1, 5000); sheet1.SetColumnWidth(2, 100);
quickmelt
Member
83 Points
60 Posts
Passing Fixed Width in Excel File using C#
Jan 06, 2012 07:11 AM|LINK
Hi, I need help! :(
I need to write to an excel file in C# but i have to pass a fixed width for each column.
For Example:
Name Length = 30
Address Length = 50
Sex = 1
In my Excel File, it should look like this:
Column A Column B Column C
Jason Anderson 123 Example St. M
Ann Roberts 456 Sample St. F
Thanks!
smirnov
All-Star
23700 Points
4056 Posts
Re: Passing Fixed Width in Excel File using C#
Jan 06, 2012 03:57 PM|LINK
You can do it using NPOI library.