Telerik Forums
UI for ASP.NET Core Forum
1 answer
53 views

Hi There, 

I'm working on a web app and need to access the Excel column with letters instead of an index. I have gone through the documentation but didn't find how we can access the Excel column with alphabets such as A20

Could you please let me know if you have any functions or not?

 

Thanks,

 

Stoyan
Telerik team
 answered on 07 Jun 2023
0 answers
102 views

Hello guys,

is it possible to define a conditional formatting on a whole column? E.g. if you want to set the background of a cell to yellow if the value is greater than 0 (see screenshot, column 'Fehlend').

In my case it's even more difficult because my whole datasource is coming from the server.

@(Html.Kendo().Spreadsheet()
	.Name("bestandsliste")
	.Columns(3)
	.HtmlAttributes(new { style = "width:100%" })
	.Sheets(x =>
	{
		x.Add()
			.Name("Bestandsliste")
			.Columns(y =>
			{
				y.Add().Width(400);
				y.Add().Width(120);
				y.Add().Width(120);
				y.Add().Width(120);
			})
			.DataSource<Fahnenbestand>(y => y
				.Custom()
				.Sort(z => z.Add(a => a.Fahnenkategorie))
				.Transport(z => z.Read("spreadsheet_onRead"))
			)
			.FrozenRows(1)
			.Rows(y =>
			{
				y.Add().Height(30).Cells(z =>
				{
					z.Add().FontSize(20).TextAlign(SpreadsheetTextAlign.Center);
					z.Add().FontSize(20).TextAlign(SpreadsheetTextAlign.Center);
					z.Add().FontSize(20).TextAlign(SpreadsheetTextAlign.Center);
					z.Add().FontSize(20).TextAlign(SpreadsheetTextAlign.Center);
				});
			});
	})
	.Sheetsbar(false)
	.Toolbar(false)
)

function spreadsheet_onRead(options) {
	$.ajax({
		url: `@ViewData[ViewDataVariables.UrlWebApi]/FlagCategory/GetOverviewAllFlagsAsSpreadsheet`,
		headers: { 'Authorization': '@token' },
		success: function (result) {
			var sheet = kendoSpreadSheetBestandsliste.activeSheet();
			sheet.resize(result.Total + 5, 3);

			options.success(result.Data);
		},
		error: function (result) {
			options.error(result);
		}
	});
}

I already check the css of the cells. Indeed I can simply set the background color of the cells of a specific column by a condition via jquery (like "if value greater 0, set background yellow"), but the cells carry very little informations. It's not possible to prove if the cell I'm currently looking is belonging to correct column. It would be easy if there would be an attribute like aria-labeledby="COLUMNHEADERCELL" but that's not the case.

<div class="k-spreadsheet-cell" style="[..]"><div class="k-vertical-align-bottom">1</div></div>

Maybe there is a solution to get all cells of one column via the api of my spreadsheet object? Looking forward to hearing from you.

Best regards,

Daniel

Daniel
Top achievements
Rank 3
Iron
Iron
Iron
 updated question on 29 Mar 2023
0 answers
46 views

Hey guys,

I'm currently working newly with the kendo spreadsheet. Default amount of rows is 200 and I can define it programatically, I know.

My spreadsheet has a datasource. Is there a smart solution to handle the count of rows by it's datasource? So if the datasource has 400 elements, that my spreadsheet increase the rows?

Best Regards,
Daniel

@(Html.Kendo().Spreadsheet()
	.Name("bestandsliste")
	.HtmlAttributes(new { style = "width:100%" })
	.Sheets(x =>
	{
		x.Add()
			.Name("Bestandsliste")
			.DataSource<Fahnenbestand>(y => y
				.Custom()
				.Transport(z => z.Read("spreadsheet_onRead"))
			);
	})
	.Sheetsbar(false)
	.Toolbar(false)
)

function spreadsheet_onRead(options) {
	$.ajax({
		url: `@ViewData[ViewDataVariables.UrlWebApi]/FlagCategory/GetOverviewAllFlagsAsSpreadsheet`,
		headers: { 'Authorization': '@token' },
		success: function (result) {
			console.log(options);
			console.log(options.rows);
			options.success(result.Data);
		},
		error: function (result) {
			options.error(result);
		}
	});
}



 

Daniel
Top achievements
Rank 3
Iron
Iron
Iron
 asked on 27 Mar 2023
1 answer
61 views
I try to upload a 15MB xlsx file but it seems to crash/freeze my browser.
Alexander
Telerik team
 answered on 13 Mar 2023
1 answer
46 views

Navigation imporvemtns to speedsheet.

 

Is it possible to only move between "open cells for input. " With fx. using tab or enter. 

When you are input finance data. It would be nice, that with a tab, it only moves between open cell. Is this possible. 

reg. jakob

 

link to speecsheet navigation

Mihaela
Telerik team
 answered on 03 Feb 2023
1 answer
50 views

Hi all, 

I'm trying to understand if it is possible to create a Spreadsheet with the RadSpreadProcessing library and work with it in a web environment. I saw from older posts that there was a Telerik.Web.Spreadsheet library that supported this integration, but it seems that it is not directly supported now with .NET 6.

I need to show a spreadsheet to the user on a browser, with support for formulas, macros, excel graphs, workbook/worksheet protection, autofit of columns, basically everything that can be done with excel. From the documentation it seems that many of the features that I need are not supported by Telerik UI Web, but are supported by the RadSpreadProcessing. Is it correct? Is there a way to implement all this with the Web UI libraries?

Thank you everyone in advance!

Tommaso

Aleksandar
Telerik team
 answered on 25 Oct 2022
1 answer
67 views

Hello, I would like to know if there is any way to extract the graphs from an excel sheet.  I have managed to export the content of the excel sheet but I have not been able to export the graph that is generated there

So far this is the code I handle

 


 byte[] bytes = System.IO.File.ReadAllBytes(@"path");
                Stream stream2 = new MemoryStream(bytes);

                Workbook workbook = Workbook.Load(stream2, ".xlsx");


                Telerik.Windows.Documents.Spreadsheet.Model.Workbook document = workbook.ToDocument();

                document.ActiveSheet = document.Worksheets.First(sheet => sheet.Name == "Rep.F3");
                foreach (Telerik.Windows.Documents.Spreadsheet.Model.Worksheet sheet in document.Worksheets)
                {

                    if (sheet.Name != "Rep.F3")
                    {
                        sheet.Visibility = Telerik.Windows.Documents.Spreadsheet.Model.SheetVisibility.Hidden;
                        //document.Worksheets.Remove(sheet);
                    }
                    else
                    {
                        var shapes = sheet.Shapes;
                        var img= sheet.Images;
                        sheet.WorksheetPageSetup.PaperType = Telerik.Windows.Documents.Model.PaperTypes.A4;
                        sheet.WorksheetPageSetup.PageOrientation = Telerik.Windows.Documents.Model.PageOrientation.Portrait;
                        sheet.WorksheetPageSetup.CenterHorizontally = true;
                        sheet.WorksheetPageSetup.PrintOptions.PrintGridlines = false;
                        sheet.WorksheetPageSetup.ScaleFactor = new Telerik.Documents.Primitives.Size(0.9, 1);
                        sheet.WorksheetPageSetup.Margins =
                            new Telerik.Windows.Documents.Spreadsheet.Model.Printing.PageMargins(0
                            , 20, 0, 0);
                    }

                }

 

I have tried to get the list of images and forms but it does not return any result

Stoyan
Telerik team
 answered on 21 Oct 2022
1 answer
105 views

Our customers using the spreadsheet copy/paste values in the Spreadsheet (ASP. NET CORE)

 

Sometimes pasted decimal separator is ".", sometimes is the ",".

Is there a way to search and replace the pasted values from "," to ".", or, if not, to search and replace in Spreadsheet ?

Aleksandar
Telerik team
 answered on 27 May 2022
1 answer
344 views

Hi Team,

We are using Telerik reporting service license and have developed reports but our reports are not having excel export option, however the same is working with the trial version of the product in our local environment. but not with the licensed version.

We are using Asp.Net core version 3.1.

We have tried below articles but no luck so far:

1. https://docs.telerik.com/reporting/using-reports-in-applications/dot-net-core-support

2. https://docs.telerik.com/reporting/knowledge-base/missing-docx-xlsx-pptx-xps-export-options

3. https://www.telerik.com/forums/telerik-report-only-have-pdf-excel-and-word-are-missing

Any urgent help will be appreciated.

 

Thanks,

Markandey Pandey

 

 

 

Todor
Telerik team
 answered on 13 May 2022
1 answer
83 views

I'm having an issue where I have some code that opens an existing Excel file, adds some data then saves the file. When this runs all the charts in the original Excel file disappear. 

I have tested it and even if I just open the Excel file and save it without making any changes the charts are gone. 

I can't upload Excel files here but I have attached a screenshot of the before / after.

Example code

var xlsxFormatProvider = new XlsxFormatProvider();

// Import 
using Stream input = new FileStream("c:\\tmp\\Charts.xlsx", FileMode.Open);
var workbook = xlsxFormatProvider.Import(input);


// Export
using Stream output = new FileStream("c:\\tmp\\Charts_Edited.xlsx", FileMode.Create);
xlsxFormatProvider.Export(workbook, output);

 

Thanks,

Richard

Stoyan
Telerik team
 answered on 13 Dec 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?