import { IgcSpreadsheetModule } from'igniteui-webcomponents-spreadsheet';
import { IgcSpreadsheetComponent } from'igniteui-webcomponents-spreadsheet';
import { ModuleManager } from'igniteui-webcomponents-core';
import { ExcelUtility } from'./ExcelUtility';
ModuleManager.register(IgcSpreadsheetModule);
exportclassSpreadsheetHyperlinks{
private spreadsheet: IgcSpreadsheetComponent;
constructor() {
this.spreadsheet = document.getElementById('spreadsheet') as IgcSpreadsheetComponent;
let path = 'https://static.infragistics.com/xplatform/excel/Hyperlinks.xlsx';
ExcelUtility.loadFromUrl(path).then((w) => {
this.spreadsheet.workbook = w;
});
// TODO set property settings (if any) in code-behind:
}
}
new SpreadsheetHyperlinks();
ts
<!DOCTYPE html><html><head><title>SpreadsheetHyperlinks</title><metacharset="UTF-8" /><linkrel="shortcut icon"href="https://static.infragistics.com/xplatform/images/browsers/wc.png" ><linkrel="stylesheet"href="https://fonts.googleapis.com/icon?family=Material+Icons" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Kanit&display=swap" /><linkrel="stylesheet"href="https://fonts.googleapis.com/css?family=Titillium Web" /><linkrel="stylesheet"href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css"type="text/css" /></head><body><divid="root"><divclass="container sample"><igc-spreadsheetid="spreadsheet"width="100%"height="100%"></igc-spreadsheet></div></div><!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %><scriptsrc="src/index.ts"></script><% } %>
</body></html>html
/* shared styles are loaded from: *//* https://static.infragistics.com/xplatform/css/samples */css
このサンプルが気に入りましたか? 完全な Ignite UI for Web Componentsツールキットにアクセスして、すばやく独自のアプリの作成を開始します。無料でダウンロードできます。