You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The worksheet XML files contain one or more block level elements such as
21
+
<xref:DocumentFormat.OpenXml.Spreadsheet.SheetData>. `sheetData` represents the cell table and contains
22
+
one or more <xref:DocumentFormat.OpenXml.Spreadsheet.Row> elements. A `row` contains one or more <xref:DocumentFormat.OpenXml.Spreadsheet.Cell> elements. Each cell contains a <xref:DocumentFormat.OpenXml.Spreadsheet.CellValue> element that represents the value
23
+
of the cell. For example, the SpreadsheetML for the first worksheet in a
24
+
workbook, that only has the value 100 in cell A1, is located in the
Using the Open XML SDK, you can create document structure and
41
+
content that uses strongly-typed classes that correspond to
42
+
SpreadsheetML elements. You can find these classes in the `DocumentFormat.OpenXML.Spreadsheet` namespace. The
43
+
following table lists the class names of the classes that correspond to
44
+
the `workbook`, `sheets`, `sheet`, `worksheet`, and `sheetData` elements.
45
+
46
+
**SpreadsheetML Element**|**Open XML SDK Class**|**Description**
47
+
--|--|--
48
+
`<workbook/>`|<xref:DocumentFormat.OpenXml.Spreadsheet.Workbook>|The root element for the main document part.
49
+
`<sheets/>`|<xref:DocumentFormat.OpenXml.Spreadsheet.Sheets>|The container for the block level structures such as sheet, fileVersion, and others specified in the [!include[ISO/IEC 29500 URL](../includes/iso-iec-29500-link.md)] specification.
50
+
`<sheet/>`|<xref:DocumentFormat.OpenXml.Spreadsheet.Sheet>|A sheet that points to a sheet definition file.
51
+
`<worksheet/>`|<xref:DocumentFormat.OpenXml.Spreadsheet.Worksheet>|A sheet definition file that contains the sheet data.
52
+
`<sheetData/>`|<xref:DocumentFormat.OpenXml.Spreadsheet.SheetData>|The cell table, grouped together by rows.
53
+
`<row/>`|<xref:DocumentFormat.OpenXml.Spreadsheet.Row>|A row in the cell table.
54
+
`<c/>`|<xref:DocumentFormat.OpenXml.Spreadsheet.Cell>|A cell in a row.
55
+
`<v/>`|<xref:DocumentFormat.OpenXml.Spreadsheet.CellValue>|The value of a cell.
Open(String, Boolean, OpenSettings)|[Open(String, Boolean, OpenSettings)](/dotnet/api/documentformat.openxml.packaging.spreadsheetdocument.open?view=openxml-3.0.1#documentformat-openxml-packaging-spreadsheetdocument-open(system-string-system-boolean-documentformat-openxml-packaging-opensettings))|Create an instance of the SpreadsheetDocument class from the specified file.
54
58
Open(Stream, Boolean, OpenSettings)|[Open(Stream, Boolean, OpenSettings)](/dotnet/api/documentformat.openxml.packaging.spreadsheetdocument.open?view=openxml-3.0.1#documentformat-openxml-packaging-spreadsheetdocument-open(system-io-stream-system-boolean-documentformat-openxml-packaging-opensettings))|Create an instance of the SpreadsheetDocument class from the specified I/O stream.
55
59
56
-
The table earlier in this topic lists only those **Open** methods that accept a Boolean value as the
60
+
The table earlier in this topic lists only those `Open` methods that accept a Boolean value as the
57
61
second parameter to specify whether a document is editable. To open a
58
-
document for read-only access, specify **False** for this parameter.
62
+
document for read-only access, specify `False` for this parameter.
59
63
60
-
Notice that two of the **Open** methods create
64
+
Notice that two of the `Open` methods create
61
65
an instance of the SpreadsheetDocument class based on a string as the
62
66
first parameter. The first example in the sample code uses this
63
-
technique. It uses the first **Open** method in
67
+
technique. It uses the first `Open` method in
64
68
the table earlier in this topic; with a signature that requires two
65
69
parameters. The first parameter takes a string that represents the full
66
70
path file name from which you want to open the document. The second
67
-
parameter is either **true** or **false**. This example uses **false** and indicates that you want to open the
71
+
parameter is either `true` or `false`. This example uses `false` and indicates that you want to open the
68
72
file as read-only.
69
73
70
-
The following code example calls the **Open**
74
+
The following code example calls the `Open`
71
75
Method.
72
76
73
77
### [C#](#tab/cs-0)
@@ -78,7 +82,7 @@ Method.
78
82
***
79
83
80
84
81
-
The other two **Open** methods create an
85
+
The other two `Open` methods create an
82
86
instance of the SpreadsheetDocument class based on an input/output
83
87
stream. You might use this approach, for example, if you have a
84
88
Microsoft SharePoint Foundation 2010 application that uses stream
@@ -99,12 +103,12 @@ Suppose you have an application that uses the Open XML support in the
99
103
System.IO.Packaging namespace of the .NET Framework Class Library, and
100
104
you want to use the Open XML SDK to work with a package as
101
105
read-only. Whereas the Open XML SDK includes method overloads that
102
-
accept a **Package** as the first parameter,
106
+
accept a `Package` as the first parameter,
103
107
there is not one that takes a Boolean as the second parameter to
104
108
indicate whether the document should be opened for editing.
105
109
106
110
The recommended method is to open the package as read-only at first,
107
-
before creating the instance of the **SpreadsheetDocument** class, as shown in the second
111
+
before creating the instance of the `SpreadsheetDocument` class, as shown in the second
108
112
example in the sample code. The following code example performs this
The worksheet XML files contain one or more block level elements such as
137
-
<xref:DocumentFormat.OpenXml.Spreadsheet.SheetData>. **sheetData** represents the cell table and contains
138
-
one or more <xref:DocumentFormat.OpenXml.Spreadsheet.Row> elements. A **row** contains one or more <xref:DocumentFormat.OpenXml.Spreadsheet.Cell> elements. Each cell contains a <xref:DocumentFormat.OpenXml.Spreadsheet.CellValue> element that represents the value
139
-
of the cell. For example, the SpreadsheetML for the first worksheet in a
140
-
workbook, that only has the value 100 in cell A1, is located in the
Using the Open XML SDK, you can create document structure and
157
-
content that uses strongly-typed classes that correspond to
158
-
SpreadsheetML elements. You can find these classes in the **DocumentFormat.OpenXML.Spreadsheet** namespace. The
159
-
following table lists the class names of the classes that correspond to
160
-
the **workbook**, **sheets**, **sheet**, **worksheet**, and **sheetData** elements.
161
-
162
-
SpreadsheetML Element|Open XML SDK Class|Description
163
-
--|--|--
164
-
workbook|DocumentFormat.OpenXml.Spreadsheet.Workbook|The root element for the main document part.
165
-
sheets|DocumentFormat.OpenXml.Spreadsheet.Sheets|The container for the block level structures such as sheet, fileVersion, and others specified in the [!include[ISO/IEC 29500 URL](../includes/iso-iec-29500-link.md)] specification.
166
-
sheet|DocumentFormat.OpenXml.Spreadsheet.Sheet|A sheet that points to a sheet definition file.
167
-
worksheet|DocumentFormat.OpenXml.Spreadsheet.Worksheet|A sheet definition file that contains the sheet data.
168
-
sheetData|DocumentFormat.OpenXml.Spreadsheet.SheetData|The cell table, grouped together by rows.
169
-
row|DocumentFormat.OpenXml.Spreadsheet.Row|A row in the cell table.
170
-
c|DocumentFormat.OpenXml.Spreadsheet.Cell|A cell in a row.
171
-
v|DocumentFormat.OpenXml.Spreadsheet.CellValue|The value of a cell.
The worksheet XML files contain one or more block level elements such as
59
-
<xref:DocumentFormat.OpenXml.Spreadsheet.SheetData>. **sheetData** represents the cell table and contains
60
-
one or more <xref:DocumentFormat.OpenXml.Spreadsheet.Row> elements. A **row** contains one or more <xref:DocumentFormat.OpenXml.Spreadsheet.Cell> elements. Each cell contains a <xref:DocumentFormat.OpenXml.Spreadsheet.CellValue> element that represents the value
61
-
of the cell. For example, the **SpreadsheetML**
62
-
for the first worksheet in a workbook, that only has the value 100 in
63
-
cell A1, is located in the Sheet1.xml file and is shown in the following
Using the Open XML SDK, you can create document structure and
80
-
content that uses strongly-typed classes that correspond to
81
-
SpreadsheetML elements. You can find these classes in the **DocumentFormat.OpenXML.Spreadsheet** namespace. The
82
-
following table lists the class names of the classes that correspond to
83
-
the **workbook**, **sheets**, **sheet**, **worksheet**, and **sheetData** elements.
84
-
85
-
SpreadsheetML Element|Open XML SDK Class|Description
86
-
--|--|--
87
-
workbook|DocumentFormat.OpenXml.Spreadsheet.Workbook|The root element for the main document part.
88
-
sheets|DocumentFormat.OpenXml.Spreadsheet.Sheets|The container for the block level structures such as sheet, fileVersion, and others specified in the [!include[ISO/IEC 29500 URL](../includes/iso-iec-29500-link.md)] specification.
89
-
sheet|DocumentFormat.OpenXml.Spreadsheet.Sheet|A sheet that points to a sheet definition file.
90
-
worksheet|DocumentFormat.OpenXml.Spreadsheet.Worksheet|A sheet definition file that contains the sheet data.
91
-
sheetData|DocumentFormat.OpenXml.Spreadsheet.SheetData|The cell table, grouped together by rows.
92
-
row|DocumentFormat.OpenXml.Spreadsheet.Row|A row in the cell table.
93
-
c|DocumentFormat.OpenXml.Spreadsheet.Cell|A cell in a row.
94
-
v|DocumentFormat.OpenXml.Spreadsheet.CellValue|The value of a cell.
0 commit comments