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 툴킷에 액세스하여 몇 분 만에 나만의 앱을 빌드하기 시작하세요. 무료로 다운로드하세요.
하이퍼링크 개요
하이퍼링크가 다음에 추가됩니다. IgcSpreadsheetComponent 액세스하여 제어 Hyperlinks 하이퍼링크를 배치할 워크시트의 컬렉션입니다. 이 컬렉션에는 Add 소요되는 메소드 WorksheetHyperlink 여기서는 셀 주소, 탐색할 하이퍼링크 URL, 표시 텍스트, 선택적으로 마우스를 올리면 표시할 도구 설명을 정의할 수 있습니다.
종속성
하이퍼링크를 사용하도록 Web Components 스프레드시트 컨트롤을 설정할 때 다음과 같이 클래스를 가져와야 WorksheetHyperlink 합니다.