I want to migrate ExcelWriter to EPPlus

Nov 21, 2014 at 3:50 PM
Hi people! :D I want to know if I Can migrate From ExcelWriter to EPPlus...
So I need to know what is the object into EPPlus similar to Area Object of ExcelWriter http://docs.softartisans.com/officewriterwindows/3.0.4/ExcelWriter/reference/Area.aspx?

Thanks and Sorry for my bad English! :)
Nov 21, 2014 at 3:55 PM
I've never used ExcelWriter, but I think Area is the same as ExcelRange of EPPlus.

Nov 21, 2014 at 4:08 PM
Hi Thiago, thanks for your prompt response! :)

Respect the ExcelRange Object:
  • I can sets the width of all Columns in this?
  • I cant sets the height of all Rows in this?
Thanks again and have a happy day!
Nov 21, 2014 at 4:37 PM
Edited Nov 21, 2014 at 4:38 PM

I'm almost sure that you can't do this with ExcelRange but you can set width and height in other ways. ExcelRange is a set of cells, I think you can define settings of cells like font, color, border, etc but not width and height, because you can have merged cells.
       using (ExcelRange r = worksheet.Cells["A2:G2"])
                        r.Merge = true;
                        r.Style.Font.SetFromFont(new Font("Britannic Bold", 18, FontStyle.Italic));
                        r.Style.HorizontalAlignment = ExcelHorizontalAlignment.CenterContinuous;
                        r.Style.Fill.PatternType = ExcelFillStyle.Solid;
                            worksheet.Column(1).Width = 25;
Marked as answer by jdnichollsc on 11/21/2014 at 12:37 PM