DocWright.Spreadsheet.Rendering
2.0.0
dotnet add package DocWright.Spreadsheet.Rendering --version 2.0.0
NuGet\Install-Package DocWright.Spreadsheet.Rendering -Version 2.0.0
<PackageReference Include="DocWright.Spreadsheet.Rendering" Version="2.0.0" />
<PackageVersion Include="DocWright.Spreadsheet.Rendering" Version="2.0.0" />
<PackageReference Include="DocWright.Spreadsheet.Rendering" />
paket add DocWright.Spreadsheet.Rendering --version 2.0.0
#r "nuget: DocWright.Spreadsheet.Rendering, 2.0.0"
#:package DocWright.Spreadsheet.Rendering@2.0.0
#addin nuget:?package=DocWright.Spreadsheet.Rendering&version=2.0.0
#tool nuget:?package=DocWright.Spreadsheet.Rendering&version=2.0.0
DocWright.Spreadsheet.Rendering
Saves an Excel workbook as PDF, as images and as HTML; lays a worksheet out as Excel prints it; and tells a grid view where a sheet's columns and rows are on screen.
SpreadsheetConvertersaves an opened workbook:ToPdf(what Excel's own export writes, page for page; tagged and PDF/A when asked),ToImages,RenderRange, andToHtml(one self-contained page, every cell escaped, no script). Make one and use it for every workbook.var converter = new SpreadsheetConverter(); XlsxDocument workbook = XlsxDocument.Open(File.OpenRead("orders.xlsx")); using (FileStream pdf = File.Create("orders.pdf")) { converter.ToPdf(workbook, pdf); } using (var html = new StreamWriter("orders.html")) { converter.ToHtml(workbook, html); }SpreadsheetLayout.Layout(sheet, fonts, options)(or a whole workbook) gives aLayoutDocument: the pages Excel's print of the sheet has, with each cell's text, fill and borders where Excel puts them. Draw it withDocWright.Renderers.PdforDocWright.Renderers.Imaging.var fonts = new FontEngine(new FontEngineOptions()); XlsxDocument workbook = XlsxDocument.Open(File.OpenRead("orders.xlsx")); LayoutDocument pages = SpreadsheetLayout.Layout(workbook, fonts); using FileStream pdf = File.Create("orders.pdf"); new PdfLayoutRenderer(fonts).Render(pages, pdf, new RenderOptions(), NullConversionDiagnostics.Instance);SpreadsheetGeometry.For(sheet, fonts)gives column and row positions in twips for the screen, frozen panes included, without paginating.
Conditional formats are drawn as XlsxDocumentSheet.EffectiveStyle gives them: fills, fonts, borders and colour scales
as Excel draws them, data bars solid (Excel's are a gradient); icon sets and rules given by a formula are not drawn.
Pictures are drawn over the cells, cropped, and the sheet is printed out to the last one, as Excel prints it.
Charts are drawn over the pictures where their anchors put them, by the engine a Word document's charts are drawn by
(column, bar, line, area, pie, doughnut and scatter; radar, bubble, surface, stock and 2016 charts are left out and
reported), and SpreadsheetConverter.RenderChart(chart) draws one chart on its own as an image:
foreach (XlsxChart chart in workbook.Sheets[0].Charts)
{
File.WriteAllBytes(chart.Name + ".png", converter.RenderChart(chart));
}
Shapes, text boxes and lines are drawn too, outlined by the preset table a Word document's shapes are outlined by,
filled, outlined and lettered as the shape or its theme style says; sparklines are drawn in their cells, and a
sparkline's cell is printed though it holds nothing else, as Excel prints it.
Groups of shapes, form controls, comments, icon sets, dashed borders and turned text are not drawn as Excel draws them; a sheet that has one
says so once through SpreadsheetLayoutOptions.Diagnostics. Limits.MaxPages (100,000 by default)
bounds the pages and the grid a hostile file can ask for.
Works on a workbook opened or created with DocWright.Spreadsheet (XlsxDocument). References the workbook model,
DocWright.Core, DocWright.Fonts and the PDF and image renderers; no Word package. Nothing is calculated: a
formula shows the result the file stores.
Guides and API reference: https://docs.albahadly.com/docwright/
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. 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 is compatible. 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 is compatible. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 is compatible. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.8
- DocWright.Core (>= 2.0.0)
- DocWright.Fonts (>= 2.0.0)
- DocWright.Renderers.Imaging (>= 2.0.0)
- DocWright.Renderers.Pdf (>= 2.0.0)
- DocWright.Spreadsheet (>= 2.0.0)
- Microsoft.Bcl.HashCode (>= 1.1.1)
- System.Buffers (>= 4.6.1)
- System.Memory (>= 4.6.3)
- System.Runtime.CompilerServices.Unsafe (>= 6.1.2)
-
.NETStandard 2.0
- DocWright.Core (>= 2.0.0)
- DocWright.Fonts (>= 2.0.0)
- DocWright.Renderers.Imaging (>= 2.0.0)
- DocWright.Renderers.Pdf (>= 2.0.0)
- DocWright.Spreadsheet (>= 2.0.0)
- Microsoft.Bcl.HashCode (>= 1.1.1)
- System.Buffers (>= 4.6.1)
- System.Memory (>= 4.6.3)
- System.Runtime.CompilerServices.Unsafe (>= 6.1.2)
-
net10.0
- DocWright.Core (>= 2.0.0)
- DocWright.Fonts (>= 2.0.0)
- DocWright.Renderers.Imaging (>= 2.0.0)
- DocWright.Renderers.Pdf (>= 2.0.0)
- DocWright.Spreadsheet (>= 2.0.0)
-
net8.0
- DocWright.Core (>= 2.0.0)
- DocWright.Fonts (>= 2.0.0)
- DocWright.Renderers.Imaging (>= 2.0.0)
- DocWright.Renderers.Pdf (>= 2.0.0)
- DocWright.Spreadsheet (>= 2.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.0 | 0 | 11/25/2026 |
Guides, tutorials and API reference: https://docs.albahadly.com/docwright/