Telerik Forums
Telerik Document Processing Forum
0 answers
28 views

Hello

I'm trying to create an Excel xlsx spreadsheet from data in a data table. I'm having trouble setting / defining cell borders. I would like to define a bottom black thin border for a range of cells.

I'm using this as a reference https://docs.telerik.com/devtools/document-processing/libraries/radspreadprocessing/working-with-cells/get-set-clear-properties#borders-property

I've started with this...

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

ThemableColor black = new ThemableColor(Color.FromArgb(0, 0, 0, 0));
CellBorders blackBorders = new CellBorders(new CellBorder(CellBorderStyle.Thin, black));
worksheet.Cells[4, 0, 4, 9].SetBorders(blackBorders);

In Visual Studio, ThemableColor and Color are underlined in red. When I mouse over it says 'The name 'Color' does not exist in the current context'.

Am I missing a reference or using statement to be able to use ThemableColor?

Andrew
Top achievements
Rank 1
 asked on 30 Jan 2024
0 answers
23 views
I recently began my 30 day trial with Telerik and I downloaded the Progress® Telerik® UI for ASP.NET Core product.  I am attempting to now add the necessary nuget packages within the Telerik Document Processing product.  When attempting to add the Telerik.Windows.Documents.Core nuget package via the command line, I receive the below error.  I am using a mac with visual studio code for what it is worth.  Any insight on how to work around this error is appreciated.

error: There are no versions available for the package 'Telerik.Windows.Documents.Core'.

Adam
Top achievements
Rank 1
 asked on 03 Jan 2024
1 answer
26 views

Hello,

I am trying to upload the stream object received from the 'ToXlsxStream' method of Telerik SpreadSheet processing library to Azure blob container. Unfortunately, it is saving as a blank excel file. I have data in the List object which is getting converted to xlsx stream. Not sure why the excel file is blank. Tried to save the stream to my local file explorer as well. Still, the issue persists. 

Below is the code:

 

  try
   {
Stream exportStream = exportFormat == SpreadDocumentFormat.Xlsx ? workOrderList.ToXlsxStream(columnsData, (string)options.title.ToString(), cellStyleAction: cellStyle) : workOrderList.ToCsvStream(columnsData);

Task.Factory.StartNew(() => AzureHelper.UploadReportOnCloud(exportStream,fileName, ConfigurationManager.AppSettings[Constant.REPORTATTACHMENTCONTAINER]));

}

            catch(Exception ex)
            {

            }

 

Please help me to resolve this issue.  

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 18 Dec 2023
1 answer
49 views

I need to open a spreadsheet from a template in my project.  I'm referencing this article: https://docs.telerik.com/devtools/document-processing/libraries/radspreadprocessing/working-with-workbooks/create-open-and-save-workbooks#open-a-workbook

The immediate issue I have is I don't think I have the right libraries.  I'm starting just trying to open the file.  I get an namespace error.


public async Task PopulateReport()
{
    string filePath = "~/misc/report_template.xlsx";

    Telerik.Windows.Documents.Spreadsheet.Model.Workbook workbook;
    // the XLSX format provider is used for demo purposes and can be replaced with any format provider implementing the IWorkbookFormatProvider interface
            IWorkbookFormatProvider formatProvider = new Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsx.XlsxFormatProvider();

    using (Stream input = new FileStream(filePath, FileMode.Open))
    {
        workbook = formatProvider.Import(input);
    }
}

 

I have the Telerik.UI.for.Blazor package installed.  My understanding was that document processing was included.  What am I missing?  I guess its worth mentioning I don't have a login to Telerik Nuget.  I think it has to do with my company's licensing, I downloaded the package from an internal website.

Chris
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 13 Nov 2023
1 answer
44 views

I have data like this in CLOB field in the database. When a user downloads the data, it's converted to an Excel file using OpenXML.

Customer name¤Active¤customer id¤agreement name¤agreement id¤fund isin¤fund id¤rate active¤agreement active¤agreement vp key type¤agreement vp number¤rate type¤rate commision

I am converting the site so it can run in Kubernetes using the Blazor UI components. Today it's an old MVC site.

So how can I convert all the lines of code to an Excel sheet without using too much memory?

Each CLOB is around 32mb.

Yoan
Telerik team
 answered on 02 Nov 2023
1 answer
52 views

Hello,

I have a corrupted XLSX file from CSV dataSource

With other CSV dataSource all is ok

In example in file-attach, I added CSV dataSource with corruption

There are 2 bad lines in generated XLSX file and CSV file have a good format !!!

It's not an issue with codepage or separator !

It's a projet DotNet Core 6 with last version 2023.2.713.20 of API

Do you have encountered this error already ?

Best regards

Cyril REILER

 

 

 

Cyril
Top achievements
Rank 1
Iron
 updated answer on 26 Sep 2023
1 answer
56 views

I do notice that the AutoFitHeight works fine when I'm dealing with only a single row without any merged cells.

I have a situation where I have a merged cell which is the combination of cells from the same row (i.e. B2-B5).  When trying to use AutoFitHeight, there is no change to the row height.

Is there anything I could do? 

Yoan
Telerik team
 answered on 18 Jul 2023
1 answer
54 views

I'm creating a spreadsheet Workbook, then exporting it to PDF. Each cell I write has a custom style where the FontSize is being set to 9 (and I'm also setting up fills and font effects, like bold).

When I get through writing the data to the Worksheet(s) in the Workbook, I then call AutoFitWidth on the Columns that have data.

Finally, I use the PdfFormatProvider to write the entire Workbook to a PDF file.

My problem is that text items in the cells are being clipped, even when there is room to fit them after calling AutoFitWidth.

For example:

It seems to be worse on strings with all caps. Sometimes it's just half a letter, other times it's multiple letters (the ATMOSPHERICCORR is supposed to be ATMOSPHERICCORROSION).

Here's another export in a different format:

As you can see, there's two problems based on calculating the required width. First is that AutoFitWidth is not giving enough space (mostly in the second example), but as you can see in the first example, even when there is enough horizontal space, it's still clipping off the text area within the cell.

Is the estimation assuming no caps, or is the font size/font family throwing it off (9pt)? Or am I missing something where I can force it to make more space?

Dimitar
Telerik team
 answered on 29 May 2023
0 answers
49 views


Dear sir

When using Korean fonts, the text length is cut off. (Style problem)

There is no problem when using other products.

Is there a solution?

 

 [telerik]

  [Good]


Jeonghoon
Top achievements
Rank 1
 asked on 27 Mar 2023
1 answer
112 views

I'm trying to programmatically create a spreadsheet from some data.  The spreadsheet I'm modelling has Excel filters at the top.  I've seen many different kinds of filters in the Kendo Document processing APIs, however it doesn't appear that any of them function like the default filter in Excel.  Is there a way to add this to my header cell and let Excel fill it in when the sheet is loaded?

Sample

Sample of what Excel shows when you click the filter button.

Mine (so far)

Dimitar
Telerik team
 answered on 23 Mar 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?