Skip to content

Commit 47ef92b

Browse files
Merge pull request #371 from IgniteUI/jsakamotoIGJP/cleanup-excel-library-overview
fix(excel-library): correct platform content separation and Blazor setup in overview
1 parent 66b115b commit 47ef92b

1 file changed

Lines changed: 44 additions & 7 deletions

File tree

docs/xplat/src/content/en/components/excel-library.mdx

Lines changed: 44 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ npm install --save {PackageCore}
3333
npm install --save {PackageExcel}
3434
```
3535

36+
</PlatformBlock>
37+
38+
<PlatformBlock for="Angular">
39+
3640
## Component Modules
3741

3842
The {Platform} excel library requires the following modules:
@@ -51,12 +55,28 @@ import { IgxExcelModule } from 'igniteui-angular-excel';
5155
export class AppModule {}
5256
```
5357

58+
</PlatformBlock>
59+
60+
<PlatformBlock for="React">
61+
62+
## Component Modules
63+
64+
The {Platform} excel library requires the following modules:
65+
5466
```ts
5567
import { IgrExcelModule } from 'igniteui-react-excel';
5668

5769
IgrExcelModule.register();
5870
```
5971

72+
</PlatformBlock>
73+
74+
<PlatformBlock for="WebComponents">
75+
76+
## Component Modules
77+
78+
The {Platform} excel library requires the following modules:
79+
6080
```ts
6181
// Module Manager for registering the modules of the chart
6282
import { ModuleManager } from 'igniteui-webcomponents-core';
@@ -68,6 +88,10 @@ ModuleManager.register(
6888
);
6989
```
7090

91+
</PlatformBlock>
92+
93+
<PlatformBlock for="Angular">
94+
7195
## Modules Implementation
7296

7397
The Excel Library contains 5 modules that you can use to limit bundle size of your app:
@@ -89,13 +113,19 @@ The Excel Library contains 5 modules that you can use to limit bundle size of yo
89113

90114
## Requirements
91115

92-
In order to use the {Platform} excel library, you need to add the following using statement:
116+
In order to use the {Platform} excel library, you need to add the Excel Library NuGet package like this:
117+
118+
```cmd
119+
> dotnet add package IgniteUI.Blazor.Documents.Excel
120+
```
121+
122+
Add the following using statement:
93123

94124
```razor
95125
@using Infragistics.Documents.Excel
96126
```
97127

98-
If you are using a Web Assembly (WASM) Blazor project, there are a couple of extra steps:
128+
If you are using a Blazor WebAssembly (WASM) project, there are a couple of extra steps:
99129

100130
- Add a reference to the following script in the wwwroot/index.html file:
101131

@@ -149,20 +179,25 @@ The Excel Library does not support the Excel Binary Workbook (.xlsb) format at t
149179
</DocsAside>
150180

151181
## Load and Save Workbooks
152-
Now that the Excel Library module is imported, next step is to load a workbook.
153-
154182

155183
<PlatformBlock for="Angular, React, WebComponents">
156184

157-
185+
Now that the Excel Library module is imported, next step is to load a workbook.
158186

159187
In the following code snippet, an external [ExcelUtility](excel-utility.md) class is used to save and load a <ApiLink type="Workbook" />.
160188

161189

162190
</PlatformBlock>
163191

192+
<PlatformBlock for="Blazor">
193+
194+
Now that the Excel Library package is installed, next step is to load a workbook.
164195

165-
In order to load and save <ApiLink type="Workbook" /> objects, you can utilize the save method of the actual <ApiLink type="Workbook" /> object, as well as its static `Load` method.
196+
</PlatformBlock>
197+
198+
In order to load and save <ApiLink type="Workbook" /> objects, you can utilize the `Save` method of the actual <ApiLink type="Workbook" /> object, as well as its static `Load` method.
199+
200+
<PlatformBlock for="Angular, React, WebComponents">
166201

167202
```ts
168203
import { Workbook } from "{PackageExcel}";
@@ -174,9 +209,11 @@ var workbook = ExcelUtility.load(file);
174209
ExcelUtility.save(workbook, "fileName");
175210
```
176211

212+
</PlatformBlock>
213+
177214
<PlatformBlock for="Blazor">
178215

179-
```razor
216+
```csharp
180217
protected override void OnInitialized()
181218
{
182219
var memoryStream = new System.IO.MemoryStream();

0 commit comments

Comments
 (0)