Skip to content

Commit 9666083

Browse files
committed
clean up
1 parent d75d289 commit 9666083

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/how-to-get-worksheet-information-from-a-package.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ The following assembly directives are required to compile the code in this topic
3737

3838
## Create SpreadsheetDocument object
3939

40-
In the Open XML SDK, the **[SpreadsheetDocument](/dotnet/api/documentformat.openxml.packaging.spreadsheetdocument?)** class represents an Excel document package. To create an Excel document, you create an instance of the **SpreadsheetDocument** class and populate it with parts. At a minimum, the document must have a workbook part that serves as a container for the document, and at least one worksheet part. The text is represented in the package as XML using **SpreadsheetML** markup.
40+
In the Open XML SDK, the **[SpreadsheetDocument](/dotnet/api/documentformat.openxml.packaging.spreadsheetdocument)** class represents an Excel document package. To create an Excel document, you create an instance of the **SpreadsheetDocument** class and populate it with parts. At a minimum, the document must have a workbook part that serves as a container for the document, and at least one worksheet part. The text is represented in the package as XML using **SpreadsheetML** markup.
4141

42-
To create the class instance from the document you call one of the **[Open](/dotnet/api/documentformat.openxml.packaging.spreadsheetdocument.open.md)** methods. In this example, you must open the file for read access only. Therefore, you can use the **[Open(String, Boolean)](dotnet/api/documentformat.openxml.packaging.spreadsheetdocument.open?preserve-view=true#DocumentFormat_OpenXml_Packaging_SpreadsheetDocument_Open_System_String_System_Boolean_)** method, and set the Boolean parameter to **false**.
42+
To create the class instance from the document you call one of the **[Open](/dotnet/api/documentformat.openxml.packaging.spreadsheetdocument.open.md)** methods. In this example, you must open the file for read access only. Therefore, you can use the **[Open(String, Boolean)](/dotnet/api/documentformat.openxml.packaging.spreadsheetdocument.open#DocumentFormat_OpenXml_Packaging_SpreadsheetDocument_Open_System_String_System_Boolean_)** method, and set the Boolean parameter to **false**.
4343

4444
The following code example calls the **Open** method to open the file specified by the **filepath** for read-only access.
4545

@@ -57,9 +57,9 @@ The **using** statement provides a recommended alternative to the typical .Open,
5757

5858
## Basic structure of a SpreadsheetML
5959

60-
The basic document structure of a **SpreadsheetML** document consists of the **[Sheets](/dotnet/api/documentformat.openxml.spreadsheet.sheets?preserve-view=true)** and **[Sheet](/dotnet/api/documentformat.openxml.spreadsheet.sheet?preserve-view=true)** elements, which reference the
61-
worksheets in the **[Workbook](/dotnet/api/documentformat.openxml.spreadsheet.workbook?preserve-view=true)**. A separate XML file is created
62-
for each **[Worksheet](/dotnet/api/documentformat.openxml.spreadsheet.worksheet?preserve-view=true)**. For example, the **SpreadsheetML** for a workbook that has two worksheets name MySheet1 and MySheet2 is located in the Workbook.xml file and is shown in the following code example.
60+
The basic document structure of a **SpreadsheetML** document consists of the **[Sheets](/dotnet/api/documentformat.openxml.spreadsheet.sheets)** and **[Sheet](/dotnet/api/documentformat.openxml.spreadsheet.sheet)** elements, which reference the
61+
worksheets in the **[Workbook](/dotnet/api/documentformat.openxml.spreadsheet.workbook)**. A separate XML file is created
62+
for each **[Worksheet](/dotnet/api/documentformat.openxml.spreadsheet.worksheet)**. For example, the **SpreadsheetML** for a workbook that has two worksheets name MySheet1 and MySheet2 is located in the Workbook.xml file and is shown in the following code example.
6363

6464
```xml
6565
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
@@ -71,7 +71,7 @@ for each **[Worksheet](/dotnet/api/documentformat.openxml.spreadsheet.worksheet?
7171
</workbook>
7272
```
7373

74-
The worksheet XML files contain one or more block level elements such as **SheetData**. **[SheetData](/dotnet/api/documentformat.openxml.spreadsheet.sheetdata?preserve-view=true)** represents the cell table and contains one or more **[Row](/dotnet/api/documentformat.openxml.spreadsheet.row?preserve-view=true )** elements. A **row** contains one or more **[Cell](/dotnet/api/documentformat.openxml.spreadsheet.cell?preserve-view=true)** elements. Each cell contains a **[CellValue](/dotnet/api/documentformat.openxml.spreadsheet.cellvalue?preserve-view=true)** element that represents the value of the cell. For example, the SpreadsheetML for the first worksheet in a workbook, that only has the value 100 in cell A1, is located in the Sheet1.xml file and is shown in the following code example.
74+
The worksheet XML files contain one or more block level elements such as **SheetData**. **[SheetData](/dotnet/api/documentformat.openxml.spreadsheet.sheetdata)** represents the cell table and contains one or more **[Row](/dotnet/api/documentformat.openxml.spreadsheet.row )** elements. A **row** contains one or more **[Cell](/dotnet/api/documentformat.openxml.spreadsheet.cell)** elements. Each cell contains a **[CellValue](/dotnet/api/documentformat.openxml.spreadsheet.cellvalue)** element that represents the value of the cell. For example, the SpreadsheetML for the first worksheet in a workbook, that only has the value 100 in cell A1, is located in the Sheet1.xml file and is shown in the following code example.
7575

7676
```xml
7777
<?xml version="1.0" encoding="UTF-8" ?>
@@ -112,7 +112,7 @@ After you have opened the file for read-only access, you instantiate the **Sheet
112112
Dim sheets As S = mySpreadsheet.WorkbookPart.Workbook.Sheets
113113
```
114114

115-
You then you iterate through the **Sheets** collection and display **[OpenXmlElement](/dotnet/api/documentformat.openxml.openxmlelement?preserve-view=true)** and the **[OpenXmlAttribute](/api/documentformat.openxml.openxmlattribute?preserve-view=true)** in each element.
115+
You then you iterate through the **Sheets** collection and display **[OpenXmlElement](/dotnet/api/documentformat.openxml.openxmlelement)** and the **[OpenXmlAttribute](/api/documentformat.openxml.openxmlattribute)** in each element.
116116

117117
```csharp
118118
foreach (E sheet in sheets)

0 commit comments

Comments
 (0)