This project has moved and is read-only. For the latest updates, please go here.

I want to migrate ExcelWriter to EPPlus

Nov 21, 2014 at 4: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

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

Nov 21, 2014 at 5: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 5:37 PM
Edited Nov 21, 2014 at 5: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