BootstrapBlazor.FileViewer
7.0.2
Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package BootstrapBlazor.FileViewer --version 7.0.2
NuGet\Install-Package BootstrapBlazor.FileViewer -Version 7.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BootstrapBlazor.FileViewer" Version="7.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BootstrapBlazor.FileViewer" Version="7.0.2" />
<PackageReference Include="BootstrapBlazor.FileViewer" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BootstrapBlazor.FileViewer --version 7.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: BootstrapBlazor.FileViewer, 7.0.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package BootstrapBlazor.FileViewer@7.0.2
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=BootstrapBlazor.FileViewer&version=7.0.2
#tool nuget:?package=BootstrapBlazor.FileViewer&version=7.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Blazor FileViewer 文件预览 组件
目前支支持 Excel(.docx) 和 Word(.xlsx) 格式
示例:
https://www.blazor.zone/fileViewers
https://blazor.app1.es/fileViewers
使用方法:
1.nuget包
BootstrapBlazor.FileViewer
2._Imports.razor 文件 或者页面添加 添加组件库引用
@using BootstrapBlazor.Components
3.razor页面
<FileViewer Filename="c:/DemoShared/sample.xlsx" />
<FileViewer Filename="c:/DemoShared/sample.docx" />
<FileViewer Filename="https://localhost:5011/_content/DemoShared/sample.xlsx" />
<FileViewer Filename="https://localhost:5011/_content/DemoShared/sample.docx" />
<FileViewer @ref="fileViewer" Filename=@Url />
@code{
private string Url { get; set; } = ("c:/sample.docx");
private async Task Apply()
{
await fileViewer.Reload(Url);
}
}
4.参数说明
| 参数 | 说明 | 默认值 |
|---|---|---|
| Filename | Excel/Word 文件路径或者URL | |
| Width | 宽度 | 100% |
| Height | 高度 | 700px |
| StyleString | 组件外观 Css Style | |
| Html | 设置 Html 直接渲染 | |
| Stream | 用于渲染的文件流,为空则用Filename参数读取文件 | null |
| IsExcel | 文件流模式需要指定是否 Excel | false |
| NodataString | 无数据提示文本 | 无数据 |
| LoadingString | 载入中提示文本 | 载入中... |
| Reload(string filename) | 重新载入文件方法 | |
| Refresh() | 刷新方法 |
更新历史
v7.0.2
- 修复 预览表格时间转换错误
Blazor 组件
AlexChow
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- ce.office.extension (>= 2.0.0)
- DocumentFormat.OpenXml (>= 2.19.0)
- Microsoft.AspNetCore.Components.Web (>= 6.0.0)
- NPOI (>= 2.6.0.1)
- Open-Xml-PowerTools (>= 4.4.0)
-
net7.0
- ce.office.extension (>= 2.0.0)
- DocumentFormat.OpenXml (>= 2.19.0)
- Microsoft.AspNetCore.Components.Web (>= 7.0.0)
- NPOI (>= 2.6.0.1)
- Open-Xml-PowerTools (>= 4.4.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on BootstrapBlazor.FileViewer:
| Package | Downloads |
|---|---|
|
BlazorShared
BlazorMaui , 整合Blazor,BootstrapBlazor UI组件库,Maui的共享跨平台工程示例共享库 |
|
|
BootstrapBlazor.Densen.All
Blazor 组件懒人包 |
|
|
BootstrapBlazor.Shared
Package Description |
GitHub repositories (3)
Showing the top 3 popular GitHub repositories that depend on BootstrapBlazor.FileViewer:
| Repository | Stars |
|---|---|
|
dotnetcore/BootstrapBlazor
Bootstrap Blazor is an enterprise-level UI component library based on Bootstrap and Blazor.
|
|
|
densen2014/BlazorMaui
用 c # 和 Razor 创建本机移动应用和桌面应用。使用 Blazor.BB.Maui,可以快速开发共享代码库运行于 Windows (Winforms/WPF/UWP)、Android、iOS、macOS 的应用。
|
|
|
densen2014/BlazorHybrid
关于BlazorHybrid的一切研究. 用 c # 和 Razor 创建本机移动应用和桌面应用。快速开发共享代码库运行于 Windows (Winforms/WPF/UWP)、Android、iOS、macOS、Linux 的应用。
|
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.1 | 536 | 1/28/2026 |
| 10.0.0 | 774 | 11/12/2025 |
| 9.0.0 | 11,998 | 11/13/2024 |
| 9.0.0-beta02 | 180 | 11/7/2024 |
| 9.0.0-beta01 | 671 | 11/1/2024 |
| 8.3.0 | 1,048 | 10/16/2024 |
| 8.1.1 | 513 | 10/10/2024 |
| 8.1.0 | 718 | 9/21/2024 |
| 8.0.3 | 2,909 | 5/21/2024 |
| 8.0.3-NPOI256 | 190 | 5/21/2024 |
| 8.0.3-beta2 | 208 | 5/21/2024 |
| 8.0.3-beta1 | 201 | 5/21/2024 |
| 8.0.1 | 2,986 | 12/9/2023 |
| 8.0.0 | 919 | 11/15/2023 |
| 7.0.3 | 7,075 | 2/17/2023 |
| 7.0.2 | 444 | 2/17/2023 |
| 7.0.1 | 1,872 | 12/23/2022 |
| 7.0.0 | 490 | 12/23/2022 |
| 1.0.0 | 533 | 12/23/2022 |