Skip to content

Commit bad33c2

Browse files
author
JanKallman
committed
Version 2.7.0.1
A lot of Fixes and documentation new style properties Indent and Font.VerticalAlign --HG-- extra : convert_revision : svn%3Ac031521d-7fdb-604e-9ef1-0138de3cd895/trunk%4043
1 parent dcd5ef3 commit bad33c2

30 files changed

+394
-108
lines changed

Doc/EPPlusDoc.scproj

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,23 @@
1515
<Name>Documentation</Name>
1616
<!-- SHFB properties -->
1717
<OutputPath>.\Help\</OutputPath>
18-
<HtmlHelpName>EPPlus 2.6</HtmlHelpName>
18+
<HtmlHelpName>EPPlus 2.7</HtmlHelpName>
1919
<FrameworkVersion>3.0</FrameworkVersion>
2020
<DocumentationSources>
2121
<DocumentationSource sourceFile="..\ExcelPackage\bin\Release\EPPlus.dll" xmlns="" />
22-
<DocumentationSource sourceFile="..\ExcelPackage\bin\Release\EPPlusXmlDocumentationFile.xml" xmlns="" /></DocumentationSources>
22+
<DocumentationSource sourceFile="..\ExcelPackage\bin\Release\EPPlusXmlDocumentationFile.xml" xmlns="" />
23+
</DocumentationSources>
2324
<ProjectSummary>EPPlus is a .net library that reads and writes Excel 2007 files using the Open Office Xml format.
2425
EPPlus supports ranges, cell styling, charts, picture, shapes, named ranges, Autofilter and a lot of other stuff.
2526
EPPlus started with the source from the ExcelPackage project hosted on CodePlex.</ProjectSummary>
2627
<NamespaceSummaries>
2728
<NamespaceSummaryItem name="OfficeOpenXml" isDocumented="True" xmlns="">This is the main namespace for EPPlus</NamespaceSummaryItem>
28-
<NamespaceSummaryItem name="OfficeOpenXml.Drawing" isDocumented="True" xmlns="">Contains all classes related to drawings. Drawing objects are Charts, Shapes and pictures</NamespaceSummaryItem>
29-
<NamespaceSummaryItem name="OfficeOpenXml.Drawing.Chart" isDocumented="True" xmlns="">Contains chart classes</NamespaceSummaryItem>
30-
<NamespaceSummaryItem name="OfficeOpenXml.Style" isDocumented="True" xmlns="">Contains classes for cell styling and named styles</NamespaceSummaryItem>
31-
<NamespaceSummaryItem name="OfficeOpenXml.Style.XmlAccess" isDocumented="True" xmlns="">Contains the classes that write the style xml</NamespaceSummaryItem></NamespaceSummaries>
32-
<HelpTitle>EPPlus 2.6.0.1</HelpTitle>
29+
<NamespaceSummaryItem name="OfficeOpenXml.Drawing" isDocumented="True" xmlns="">Contains all classes related to drawings. Drawing objects are Charts, Shapes and pictures</NamespaceSummaryItem>
30+
<NamespaceSummaryItem name="OfficeOpenXml.Drawing.Chart" isDocumented="True" xmlns="">Contains chart classes</NamespaceSummaryItem>
31+
<NamespaceSummaryItem name="OfficeOpenXml.Style" isDocumented="True" xmlns="">Contains classes for cell styling and named styles</NamespaceSummaryItem>
32+
<NamespaceSummaryItem name="OfficeOpenXml.Style.XmlAccess" isDocumented="True" xmlns="">Contains the classes that write the style xml</NamespaceSummaryItem>
33+
</NamespaceSummaries>
34+
<HelpTitle>EPPlus 2.7.0.1</HelpTitle>
3335
</PropertyGroup>
3436
<!-- There are no properties for these groups. AnyCPU needs to appear in
3537
order for Visual Studio to perform the build. The others are optional

EPPlusWebSample/GetSample.aspx.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ private void Sample2()
9797

9898
Response.BinaryWrite(pck.GetAsByteArray());
9999
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
100-
Response.AddHeader("content-disposition", "attachment; filename=Sample1.xlsx");
100+
Response.AddHeader("content-disposition", "attachment; filename=Sample2.xlsx");
101101
}
102102
/// <summary>
103103
/// Sample 3
@@ -122,6 +122,7 @@ private void Sample3()
122122

123123
Application["Sample3Template"] = pckTemplate.Stream;
124124
}
125+
125126
//Open the new package with the template stream.
126127
//The template stream is copied to the new stream in the constructor
127128
ExcelPackage pck = new ExcelPackage(new MemoryStream(), Application["Sample3Template"] as Stream);
@@ -133,7 +134,7 @@ private void Sample3()
133134

134135
Response.BinaryWrite(pck.GetAsByteArray());
135136
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
136-
Response.AddHeader("content-disposition", "attachment; filename=Sample1.xlsx");
137+
Response.AddHeader("content-disposition", "attachment; filename=Sample3.xlsx");
137138
}
138139
}
139140
}

ExcelPackage/Drawing/ExcelShape.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ public ExcelTextFont Font
339339
}
340340
const string TextPath = "xdr:sp/xdr:txBody/a:p/a:r/a:t";
341341
/// <summary>
342-
/// Text
342+
/// Text inside the shape
343343
/// </summary>
344344
public string Text
345345
{
@@ -354,6 +354,9 @@ public string Text
354354

355355
}
356356
ExcelParagraphCollection _richText = null;
357+
/// <summary>
358+
/// Richtext collection. Used to format specific parts of the text
359+
/// </summary>
357360
public ExcelParagraphCollection RichText
358361
{
359362
get
@@ -386,6 +389,9 @@ public eTextAnchoringType TextAnchoring
386389
}
387390
}
388391
const string TextAnchoringCtlPath = "xdr:sp/xdr:txBody/a:bodyPr/@anchorCtr";
392+
/// <summary>
393+
/// Specifies the centering of the text box.
394+
/// </summary>
389395
public bool TextAnchoringControl
390396
{
391397
get

ExcelPackage/Drawing/Vml/ExcelVmlDrawing.cs

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ public string Id
5353
}
5454
}
5555
const string VERTICAL_ALIGNMENT_PATH="x:ClientData/x:TextVAlign";
56+
/// <summary>
57+
/// Vertical alignment for text
58+
/// </summary>
5659
public eTextAlignVerticalVml VerticalAlignment
5760
{
5861
get
@@ -84,6 +87,9 @@ public eTextAlignVerticalVml VerticalAlignment
8487
}
8588
}
8689
const string HORIZONTAL_ALIGNMENT_PATH="x:ClientData/x:TextHAlign";
90+
/// <summary>
91+
/// Horizontal alignment for text
92+
/// </summary>
8793
public eTextAlignHorizontalVml HorizontalAlignment
8894
{
8995
get
@@ -115,6 +121,9 @@ public eTextAlignHorizontalVml HorizontalAlignment
115121
}
116122
}
117123
const string VISIBLE_PATH = "x:ClientData/x:Visible";
124+
/// <summary>
125+
/// If the drawing object is visible.
126+
/// </summary>
118127
public bool Visible
119128
{
120129
get
@@ -137,6 +146,9 @@ public bool Visible
137146
}
138147
const string BACKGROUNDCOLOR_PATH = "@fillcolor";
139148
const string BACKGROUNDCOLOR2_PATH = "v:fill/@color2";
149+
/// <summary>
150+
/// Background color
151+
/// </summary>
140152
public Color BackgroundColor
141153
{
142154
get
@@ -169,6 +181,9 @@ public Color BackgroundColor
169181
}
170182
const string LINESTYLE_PATH="v:stroke/@dashstyle";
171183
const string ENDCAP_PATH = "v:stroke/@endcap";
184+
/// <summary>
185+
/// Linestyle for border
186+
/// </summary>
172187
public eLineStyleVml LineStyle
173188
{
174189
get
@@ -212,6 +227,9 @@ public eLineStyleVml LineStyle
212227
}
213228
}
214229
const string LINECOLOR_PATH="@strokecolor";
230+
/// <summary>
231+
/// Line color
232+
/// </summary>
215233
public Color LineColor
216234
{
217235
get
@@ -242,6 +260,9 @@ public Color LineColor
242260
}
243261
}
244262
const string LINEWIDTH_PATH="@strokeweight";
263+
/// <summary>
264+
/// Width of the border
265+
/// </summary>
245266
public Single LineWidth
246267
{
247268
get
@@ -322,6 +343,9 @@ public Single LineWidth
322343
// }
323344
//}
324345
const string TEXTBOX_STYLE_PATH = "v:textbox/@style";
346+
/// <summary>
347+
/// Autofits the drawingobject
348+
/// </summary>
325349
public bool AutoFit
326350
{
327351
get
@@ -336,6 +360,9 @@ public bool AutoFit
336360
}
337361
}
338362
const string LOCKED_PATH = "x:ClientData/x:Locked";
363+
/// <summary>
364+
/// If the object is locked when the sheet is protected
365+
/// </summary>
339366
public bool Locked
340367
{
341368
get
@@ -347,7 +374,10 @@ public bool Locked
347374
SetXmlNodeBool(LOCKED_PATH, value, false);
348375
}
349376
}
350-
const string LOCK_TEXT_PATH = "x:ClientData/x:LockText";
377+
const string LOCK_TEXT_PATH = "x:ClientData/x:LockText";
378+
/// <summary>
379+
/// Specifies that the object's text is locked
380+
/// </summary>
351381
public bool LockText
352382
{
353383
get
@@ -360,6 +390,9 @@ public bool LockText
360390
}
361391
}
362392
ExcelVmlDrawingPosition _from = null;
393+
/// <summary>
394+
/// From position. For comments only when Visible=true.
395+
/// </summary>
363396
public ExcelVmlDrawingPosition From
364397
{
365398
get
@@ -372,6 +405,9 @@ public ExcelVmlDrawingPosition From
372405
}
373406
}
374407
ExcelVmlDrawingPosition _to = null;
408+
/// <summary>
409+
/// To position. For comments only when Visible=true.
410+
/// </summary>
375411
public ExcelVmlDrawingPosition To
376412
{
377413
get

ExcelPackage/Drawing/Vml/ExcelVmlDrawingPosition.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ public ExcelVmlDrawingPosition(XmlNamespaceManager ns, XmlNode topNode, int star
1313
{
1414
_startPos = startPos;
1515
}
16+
/// <summary>
17+
/// Row. Zero based
18+
/// </summary>
1619
public int Row
1720
{
1821
get
@@ -24,6 +27,9 @@ public int Row
2427
SetNumber(2, value);
2528
}
2629
}
30+
/// <summary>
31+
/// Row offset in pixels. Zero based
32+
/// </summary>
2733
public int RowOffset
2834
{
2935
get
@@ -35,6 +41,9 @@ public int RowOffset
3541
SetNumber(3, value);
3642
}
3743
}
44+
/// <summary>
45+
/// Column. Zero based
46+
/// </summary>
3847
public int Column
3948
{
4049
get
@@ -46,6 +55,9 @@ public int Column
4655
SetNumber(0, value);
4756
}
4857
}
58+
/// <summary>
59+
/// Column offset. Zero based
60+
/// </summary>
4961
public int ColumnOffset
5062
{
5163
get

ExcelPackage/ExcelAddress.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,12 @@ namespace OfficeOpenXml
3434
/// <summary>
3535
/// A range address
3636
/// </summary>
37+
/// <remarks>Examples of addresses are "A1" "B1:C2" "A:A" "1:1" "A1:E2,G3:G5" </remarks>
3738
public class ExcelAddressBase : ExcelCellBase
3839
{
39-
protected int _fromRow=-1, _toRow, _fromCol, _toCol;
40+
internal protected int _fromRow=-1, _toRow, _fromCol, _toCol;
4041
internal protected string _ws;
41-
protected string _address;
42+
internal protected string _address;
4243
#region "Constructors"
4344
internal ExcelAddressBase()
4445
{
@@ -54,6 +55,11 @@ public ExcelAddressBase(int fromRow, int fromCol, int toRow, int toColumn)
5455
_address = GetAddress(_fromRow, _fromCol, _toRow, _toCol);
5556
// GetRowColFromAddress(_address, out _fromRow, out _fromCol, out _toRow, out _toCol);
5657
}
58+
/// <summary>
59+
/// Creates an Address object
60+
/// </summary>
61+
/// <remarks>Examples of addresses are "A1" "B1:C2" "A:A" "1:1" "A1:E2,G3:G5" </remarks>
62+
/// <param name="address">The Excel Address</param>
5763
public ExcelAddressBase(string address)
5864
{
5965
SetAddress(address);
@@ -265,6 +271,7 @@ public ExcelAddress(string address)
265271
: base(address)
266272
{
267273
}
274+
268275
internal ExcelAddress(string ws, string address)
269276
: base(address)
270277
{
@@ -273,6 +280,7 @@ internal ExcelAddress(string ws, string address)
273280
/// <summary>
274281
/// The address for the range
275282
/// </summary>
283+
/// <remarks>Examples of addresses are "A1" "B1:C2" "A:A" "1:1" "A1:E2,G3:G5" </remarks>
276284
public string Address
277285
{
278286
get

ExcelPackage/ExcelComment.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ private int GetAuthor(string value)
7171
}
7272
return authorRef;
7373
}
74+
/// <summary>
75+
/// The comment text
76+
/// </summary>
7477
public string Text
7578
{
7679
get
@@ -83,7 +86,7 @@ public string Text
8386
}
8487
}
8588
/// <summary>
86-
/// Sets the font the first richtext item.
89+
/// Sets the font of the first richtext item.
8790
/// </summary>
8891
public ExcelRichText Font
8992
{

ExcelPackage/ExcelCommentCollection.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,13 @@ public ExcelComment this[ExcelCellAddress cell]
9696
}
9797
}
9898
}
99+
/// <summary>
100+
/// Adds a comment to the top left cell of the range
101+
/// </summary>
102+
/// <param name="cell">The cell</param>
103+
/// <param name="Text">The comment text</param>
104+
/// <param name="author">Author</param>
105+
/// <returns>The comment</returns>
99106
public ExcelComment Add(ExcelRangeBase cell, string Text, string author)
100107
{
101108
var elem = CommentXml.CreateElement("comment", ExcelPackage.schemaMain);

ExcelPackage/ExcelNamedRange.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public ExcelNamedRange(string name, ExcelWorksheet nameSheet , ExcelWorksheet sh
5353
_sheet = nameSheet;
5454
if (nameSheet != null)
5555
{
56-
LocalSheetId = nameSheet.SheetID-1;
56+
LocalSheetId = nameSheet.PositionID-1;
5757
}
5858
else
5959
{

0 commit comments

Comments
 (0)