Telerik Forums
Telerik Document Processing Forum
1 answer
11 views

 

Hello Telerik Team,

I'm working on an Excel export feature in a .NET application using Telerik Document Processing, and I need guidance on handling product images in an exported Excel workbook.

Environment

  • Telerik Document Processing version: 2024.1.124
Output format: .xlsx
  • Target application: Microsoft Excel
Images are retrieved as byte arrays from a private Azure Blob Storage container and embedded in the workbook using Telerik's FloatingImage API.

Problem Statement

The exported Excel workbook opens successfully, and all product images display correctly.

However, when a user deletes an entire product row by selecting the row header and choosing Delete, the image-to-product association is not preserved reliably. The remaining product rows move up, but the deleted product's image can reappear or become visible in the wrong position when the image is selected and Excel's Place in Cell command is used.

Sorting and filtering have appeared to work in our initial tests, but we need reliable behavior across normal Excel operations, including sorting, filtering, deleting rows, copying rows, and saving and reopening the workbook.

Our current implementation uses Telerik's FloatingImage API, which appears to store images as separate floating drawing objects rather than as values associated with their corresponding product cells.

Questions

  1. Does Telerik Document Processing version 2024.1.124 provide a supported API to configure floating images to move and resize with cells, or otherwise maintain their association with the corresponding product row when rows are deleted or sorted?

  2. Is it possible to configure image anchor behavior, such as the Open XML editAs setting, through a supported Telerik API rather than modifying the exported XML manually?

  3. Does Telerik Document Processing support native Excel in-cell images equivalent to Excel's Place in Cell feature? If not in version 2024.1.124, is this supported in a newer version or planned for a future release?

  4. If native in-cell images are not supported, what is the recommended Telerik-supported approach for ensuring embedded images remain associated with their corresponding product rows during sorting and row deletion?

Constraints

  • Product images must remain embedded in the exported Excel workbook.
  • Images are stored in a private Azure Blob Storage container.
  • Public image URLs and SAS URLs for Excel's IMAGE() formula are not an option.
  • VBA and macros cannot be used.
  • Introducing additional NuGet packages is not preferred.
  • The output must remain a valid, editable .xlsx workbook that opens normally in Excel.
  • We want to avoid unsupported XML modifications that could corrupt the workbook.

Could you please clarify whether this behavior can be achieved with the current version, whether upgrading Telerik would help, and which supported API or approach you recommend?

Thank you for your help.

Yoan
Telerik team
 answered on 26 Oct 2026
2 answers
196 views

Hello,

I just upgraded telerik, and i have troubles referencing  Workbook / Worksheet / etc...

Is the documentation up to date ?

In the documentation, namespace for Workbook is still Telerik.Windows.Documents.Spreadsheet.Model. But it doesnt exist anymore : 

 

I am using 11.1.0 :

 

 

 

 

Sébastien
Top achievements
Rank 1
Iron
 answered on 21 Aug 2025
1 answer
465 views
I'm using SpreadProcessing in conjunction with a Blazor TelerikSpreadsheet component and when there are two worksheets and the second sheet is active, Workbook.ActiveWorksheet is incorrectly reporting that the first sheet is active. See the attached repro project.
Yoan
Telerik team
 answered on 21 Jul 2025
2 answers
215 views

I'm using SpreadProcessing in conjunction with a Blazor TelerikSpreadsheet component and I've found that when I copy a cell from any Excel file and paste that into any cell in the TelerikSpreadsheet and then subsequently call XlsxFormatProvider.Import(), it throws an exception with the following message:

Not supported from value: start

I've attached a sample project to demonstrate the issue.

How can I successfully paste from Excel and then call XlsxFormatProvider.Import()?


Dess | Tech Support Engineer, Principal
Telerik team
 answered on 17 Jul 2025
0 answers
253 views

I'm using SpreadProcessing in conjunction with a Blazor TelerikSpreadsheet component, and as I understand it from the documentation, if I want to mark certain cells as read only, the way to do that is by protecting the worksheet and then unlocking the cells I want to be editable. In my use case I need to disable the cells in the first row but leave all other cells editable and I've encountered two issues.

First, if I set up a loop to spin through the rows (other than the fist row) and mark them as unlocked, as such:


        for (var i = 1; i < worksheet.Rows.Count; i++)
        {
            worksheet.Rows[i].SetIsLocked(false);
        }

The first issue is that worksheet.Rows.Count returns 1,048,576 rows. By default the spreadsheet displays 200 rows. I don't know if that default is on the Blazor side and that it only displays 200 of the 1,048,576 rows that are actually in the worksheet or what, but it's not really reasonable to spin through all those rows attempting to unlock them when they're not even visible. So that's issue number 1.

Issue number 2 is, calling SetIsLocked(false) on each row doesn't actually unlock the row. It has no effect. However I've found that if I call SetIsLocked(false) on a column, the column does get unlocked but if I then try to lock the cell in the first row of that column it doesn't get locked. So it's like the unlock of the column overrides the lock of the individual cell in that column. The only way I've been able to get this to work is as such:


        for (var i = 1; i < 199; i++)
        {
            for (int j = 0; j < columnTitles.Count; j++)
            {
                worksheet.Cells[i, j].SetIsLocked(false);
            }
        }

columnTitles is my list of column headers so I'm really only enabling the cells under the column headers I've added and not the complete row, but that's fine. But I've had to hardcode the highest row index of 199. Again, I don't know where that default comes from but it's not good to hardcode that index because it could always change in a future version.

So my question is, is there a better, more efficient way to lock the first row but unlock all other rows?

Doug
Top achievements
Rank 1
Iron
Iron
Veteran
 asked on 10 Jul 2025
2 answers
202 views

I'm using SpreadProcessing in conjunction with a TelerikSpreadsheet in a Blazor app where the user can modify a spreadsheet and click a submit button. In my submit handler I'm using the result of Worksheet.UsedCellRange to set up my loops for the purpose of validation. When the user clicks submit, I get the expected result from Worksheet.UsedCellRange and then I spin the used rows and columns and apply validation. If there are validation errors I make the cell red and then export the workbook back to a memory stream and assign the byte array back to the variable to which the spreadsheet is bound. That works fine.

The issue I'm having is that if the user clicks submit, gets validation errors, makes a change and then clicks the submit button a second time, the result I get from Worksheet.UsedCellRange includes all rows, even if only one or two rows actually have data. To narrow down the issue I removed all my validation logic so I am not making any changes to the cells before I assign the byte array, but the second time through the result of UsedCellRange still reports all rows. Am I not assigning the byte array correctly at the end of my submit method? See code:


    private async Task OnSubmitAsync()
    {
            byte[] sheet = await _spreadsheetRef.ExportToExcelAsync();

            using MemoryStream ms = new(sheet);

            XlsxFormatProvider formatProvider = new();
            Workbook workbook = formatProvider.Import(ms, new TimeSpan(0, 0, 5));
            Worksheet worksheet = workbook.Worksheets.First();

            // The first time through this is correct, second time through it reports all 200 rows are in use. Why?
            CellRange cellRange = worksheet.UsedCellRange;

            // Validation logic would normally go here

            // Set the byte array back to the bound variable
            // Should I be doing this differently?
            ms.SetLength(0);
            formatProvider.Export(workbook, ms, new TimeSpan(0, 0, 30));
            _fileData = ms.ToArray(); // _fileData is bound to the TelerikSpreadsheet component
   }

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 10 Jul 2025
3 answers
302 views

I've seen a couple other posts here about export performance, but they both refer to relatively large amounts of data. I am having issues so I stripped my example down to the where it's exporting a blank spreadsheet (see code below) but it still takes over 10 seconds running in debug on my laptop. I'm using this in the context of a Blazor app and since this is synchronous the page hangs while the export is running. What can I do to speed this up?


            Workbook workbook = new Workbook();
            Worksheet worksheet = workbook.Worksheets.Add();

            IWorkbookFormatProvider formatProvider = new XlsxFormatProvider();
            using MemoryStream ms = new();
            formatProvider.Export(workbook, ms, new TimeSpan(0, 0, 30)); // This takes over 10 seconds

            _fileData = ms.ToArray(); // byte array that the Blazor component reads

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 02 Jul 2025
1 answer
224 views

We need to print a GridView and are implementing the code found in "GridView | Print and Print Preview" example in the WPF Desktop Examples 2024 Q4  app but are encountering two issues also present in the Telerik-provided example.

1) Changes made in Print Preview are not carried over when the Print button is pressed.  For example, if you change to Landscape/Legal in Print Preview, this will revert back to Portrait/Letter when Print is clicked.

2) Clicking Print on the Print Preview window shoves the Print Preview window to the background and if Cancel is clicked on the Print window, the user has to Alt-Tab through windows to find the Print Preview window to close it.

Stenly
Telerik team
 answered on 24 Apr 2025
2 answers
281 views

We need to set a spreadsheet font to Courier New in a WPF app using telerik.ui.for.wpf.60.xaml\2024.2.514.  As a first step, we do:

using System.Windows;
using Telerik.Documents.Common.Model;

namespace WpfApp4;

public partial class MainWindow : Window
{
    public MainWindow()
    {
        InitializeComponent();
        var fontFamily = new ThemableFontFamily("Courier New");
    }
}

Which is fine until we add a required cross-platform project referencing telerik.documents.core\2024.2.426

Then we get:

The type 'ThemableFontFamily' exists in both 'Telerik.Documents.Core, Version=2024.2.426.20, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' and 'Telerik.Windows.Documents.Core, Version=2024.2.426.60, Culture=neutral, PublicKeyToken=5803cfa389c90ce7'

Ambiguous reference.
Candidates are:
Telerik.Documents.Common.Model.ThemableColor
Telerik.Documents.Common.Model.ThemableColor

What is the proper fix for this to reference the version in the WPF app project?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 10 Apr 2025
1 answer
261 views
Im using:
var xlsxProvider = new XlsxFormatProvider();
var pdfFormatProvider = new PdfFormatProvider();

byte[] docBytes = File.ReadAllBytes(path);
Workbook workbook = xlsxProvider.Import(docBytes, null);

byte[] resultBytes = pdfFormatProvider.Export(workbook, null);
File.WriteAllBytes(resultPath, resultBytes);

to conver xlsx file to pdf. In source xlsx file a have a Table and a formula '=SUBTOTAL(109, Table2[...]) that work in xlsx, but when i export it to PDF i need to have the calculated value, but instead im getting the string  '=SUBTOTAL(109, Table2[...]) . 

Is there a simple way to force calculation of all formulas in the sheet before exporting it to PDF?
Yoan
Telerik team
 answered on 28 Feb 2025
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?