Hi,
empty asp net core project
when trying to export a empty file (code from examples) and always get the error:
"Index and count must refer to a location within the string (Parameter 'count')" (see on screenshot)
(the export logic is bound to the "Privacy" route in the "Home" controller)
windows 7, visual studio 2022, telerik asp net core 2021.3.1109
project attachet
Hi,
I'm using the Telerik spreadsheet component to open an excel file embedded in a Winforms page.
I notice that dependent dropdowns do not work anymore, they show as empty.
What's the best way to have a dependent dropdown shown with Telerik?
I've tried multiple methods like https://www.contextures.com/xldataval02.html or with Index/Match combination in the Data Validation, all work directly in Excel .. but once opened in the embedded page with Telerik these dependent dropdowns don't work anymore and show as empty.
I notice the named ranges dissappear once opened with the component.
Any advice / suggestions on this?
Thx in advance!
Hi,
I have a simple Excel file with just one sheet and one image in .xls and in .xlsx (attached in the zip file).
When reading the files using the XlsFormatProvider or XlsxFormatProvider, I get a workbook. When iterating the shapes on every sheet, I have a different result. I can retrieve the image using the XlsxFormatProvider in the xlsx file, but I'm not getting any shapes in the .xls file using the XlsFormatProvider.
Some code below:
var provider = new XlsxFormatProvider();
using (var fs = File.OpenRead("image.xlsx"))
{
var workbook = provider.Import(fs);
Assert.AreEqual(workbook.ActiveWorksheet.Shapes.Images.Count(), 1);
}
Should I be doing this differently? Or is this a known limitation?
I'm using version 2021.3.909.40.
Edit: just noticed that the same goes for charts.
Hi
Recently I upgraded our c# project making use of the Telerik.Documents.Spreadsheet.FormatProviders.OpenXml component from 2021.1.322 to 2021.2.50 (actually to the latest 2021.3.909 but in this case that doesn't matter.
I want to make use of the CONCAT function which is supported in this version.
After upgrading the unittests stopped working on the fact that the worksheet functions (after setting some values in the worksheet) are not completely executed/updated. After rolling back the version to 2021.1.322 it worked again (but the concat function is not supported).
Regards,
Bart Huls
I'm trying to convert a DataTable to a spreadsheet.
According to the documentation:
To use the DataTableFormatProvider you need to reference the Telerik.Windows.Documents.Spreadsheet assembly.
After adding a reference to this assembly, Visual Studio still does not recognize it. Where can I find the DataTableFormatProvider?
Thanks,
Tim
Hi
Using Telerik.Windows.Documents.Spreadsheet.Model.Workbook class, it seems there is no VLOOKUP function, although there is a LOOKUP function which works almost the same way. The lack of VLOOKUP specifically impacts my ability to load existing Excel documents. Is there a way to add a VLOOKUP function to the SpreadProcessing engine?
Thanks,
Guy
We are migrating to telerik but our main issue is that XlsFormatProvider keep gaving OutOfMemoryException when importing files either on stream or bytes, and this where easily imported on same machines using ASPOSE dlls
is there a way to have this sorted out another library i should use or different class?
Not sure that this actually qualifies as a bug, but it was unexpected behavior. For unit testing I was creating an empty Workbook document and writing it to a file. It turns out, that the file is corrupt unless it has a Worksheet added to it. The XlsxFormatProvider does not issue any error and happily writes a 3k file, but Excel can't read it. Excel throws a dialog "We found a problem with some content in the 'test.xlsx'. Do you want us...". Selecting Yes eventually comes back with a "The workbook cannot be opened or repaired by Microsoft Excel because it is corrupt." message.
Simply adding a worksheet:
workbook.Worksheets.Add()
will allow it to create a file that Excel will handle. Again, not sure you could call this a bug, but it wasn't what I expected it to do. It might be better if the XlsxFormatProvider threw an exception for trying to write out an empty file.
At any rate, figured I throw this out there in case anyone else runs into this behavior.
While evaluating Telerik.Documents.Spreadsheet.Trial (2021.1.118) I've encountered a bug with registering custom functions in .NET 5.
I'm using a console application, and trying to register a couple of functions right at the start of the Main() method. It works like a charm with target framework netcoreapp3.1.
But as soon as I bump the version to net5.0, registering a function throws an exception (I've copied the full stack below).
Perhaps you can guide me what happens? We're currently evaluating on upgrading our license for the latest features, but this thing could be crucial to us, since we need to use .NET 5 for a couple of reasons.
I'm calling them right at the start of the applicaption
public
static
void
Main(
string
[] args)
{
FunctionManager.RegisterFunction(
new
AAA());
FunctionManager.RegisterFunction(
new
BBB());
...
}
Here's the exception stack:
Unhandled exception. System.TypeInitializationException: The type initializer for 'Telerik.Windows.Documents.Spreadsheet.Expressions.Functions.FunctionManager' threw an exception.
---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.TypeInitializationException: The type initializer for 'Telerik.Windows.Documents.Spreadsheet.Expressions.Functions.Db' threw an exception.
---> System.ArgumentOutOfRangeException: Index and count must refer to a location within the string. (Parameter 'count')
at System.String.Remove(Int32 startIndex, Int32 count)
at Telerik.Windows.Documents.Spreadsheet.Formatting.FormatHelper.FindAllOccurrences(String value, String part)
at Telerik.Windows.Documents.Spreadsheet.Formatting.FormatHelper.ReplaceSeparators(String formatString, Predicate`1 shouldReplaceWithGroupSeparator, Predicate`1 shouldReplaceWithDecimalSeparator, String newGroupSeparat
or, String newDecimalSeparator)
at Telerik.Windows.Documents.Spreadsheet.Formatting.FormatHelper.ReplaceCultureSpecificSeparatorsWithDefaults(String formatString, Nullable`1 formatStringCategory)
at Telerik.Windows.Documents.Spreadsheet.Model.CellValueFormat..ctor(String formatString, Boolean convertToInvariant, Nullable`1 formatStringCategory)
at Telerik.Windows.Documents.Spreadsheet.Model.CellValueFormat..ctor(String formatString)
at Telerik.Windows.Documents.Spreadsheet.Expressions.Functions.Db..cctor()
--- End of inner exception stack trace ---
at Telerik.Windows.Documents.Spreadsheet.Expressions.Functions.Db..ctor()
--- End of inner exception stack trace ---
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean wrapExceptions, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& hasNoDefaultCtor)
at System.RuntimeType.CreateInstanceDefaultCtorSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean fillCache)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, Boolean wrapExceptions)
at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions)
at System.Activator.CreateInstance(Type type)
at Telerik.Windows.Documents.Spreadsheet.Expressions.Functions.FunctionManager..cctor()
--- End of inner exception stack trace ---
at Telerik.Windows.Documents.Spreadsheet.Expressions.Functions.FunctionManager.RegisterFunction(FunctionBase function)
at Iface.Oik.ScriptEngine.Program.Main(String[] args) in C:\Users\alexeid\Rider\Iface.Oik.ScriptEngine\src\Program.cs:line 20