Hello!
Faced an incomprehensible problem.
When trying to open a workbook, an exception is thrown:
ArgumentOutOfRangeException: Index and count must refer to a location within the string. (Parameter 'count')
At the same time, everything works fine on the working computer during development, there is no exception.
The problem pops up when placing a project on a hosting.
The library from Syncfusion in a similar environment opens the file normally on the hosting.
Library version 2020.3.1019
.net5 Server-side project
private void LoadFile()
{
try
{
string path = Path.Combine(Path.GetPathRoot(Environment.SystemDirectory), "Templates", $"temp.xlsx");
using FileStream stream = new FileStream(path, FileMode.Open, FileAccess.Read);
XlsxFormatProvider formatProvider = new XlsxFormatProvider();
// Getting exception there while hosted
using Workbook workbook = formatProvider.Import(stream);
}
catch (Exception error)
{
NotificationReference.Show(new NotificationModel()
{
Text = $"{error.GetType().Name}: {error.Message}",
ThemeColor = "primary"
});
}
}
Hi
In the documentation for CsvFormatProvider (https://docs.telerik.com/devtools/document-processing/libraries/radspreadprocessing/formats-and-conversion/csv/settings) it is decribed that you can use Settings.Encoding to set the encoding when exporting.
How does it work when importing a file? Does CsvFormatProvider automatically detect the encoding of the provided file? Or do I need to ensure that files that I import always have a certain encoding?
Thanks!
Hi,
It looks like that there is no support for the XLOOKUP function. Result is "#NAME?"
Can you give me any tips to get around this issue?
Regards,
Bart
Hi
I'm trying to update from Telerik.Documents.Spreadsheet 2020.3.915 to 2020.3.1019
I get the following exception:
System.IO.FileNotFoundException : Could not load file or assembly 'Telerik.Zip, Version=2020.3.1019.20, Culture=neutral, PublicKeyToken=5803cfa389c90ce7'. The system cannot find the file specified.
Hello!
I'm create xlsx from template, which contains some chart
string path = Path.Combine(Path.GetPathRoot(Environment.SystemDirectory), "Templates", "Charts.xlsx");
using FileStream stream = new FileStream(path, FileMode.Open, FileAccess.Read);
XlsxFormatProvider formatProvider = new XlsxFormatProvider();
using Workbook workbook = formatProvider.Import(stream);
But workbook doesn't contains any chart objects after importing from stream.
Why?
I am using version 2019.1.215.
I am importing an excel file to modify some cell values and exporting it.
The issue is that the exported file is displaying the filter icon for the merged cells.
Is this fixed in the latest versions?
Hi,
I'm trying to export excel to PDF with letter head on each page of the PDF. how can I achieve it?
Thanks,
Niraja.
I am using version 2019.1.215 and I am unable to import anything to fix the missing ScatterSeries classes.
SeriesGroup scatterSeriesGroup = chart.Chart.SeriesGroups.First() as ScatterSeriesGroup;
ScatterSeries scatterSeries = scatterSeriesGroup.Series.First() as ScatterSeries;
scatterSeries.Marker = new Marker();
scatterSeries.Marker.Symbol = MarkerStyle.Plus;
scatterSeries.Marker.Size = 22;
scatterSeries.Outline.Fill = new SolidFill(Colors.Red);
01.
Workbook workbook =
new
Workbook();
02.
Worksheet worksheet = workbook.Worksheets.Add();
03.
04.
worksheet.Columns[1].SetWidth(
new
ColumnWidth(8.11,
true
));
05.
worksheet.Columns[2].SetWidth(
new
ColumnWidth(33.78,
true
));
06.
worksheet.Columns[3].SetWidth(
new
ColumnWidth(60.67,
true
));
07.
worksheet.Columns[4].SetWidth(
new
ColumnWidth(7.67,
true
));
08.
09.
IWorkbookFormatProvider formatProvider =
new
Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsx.XlsxFormatProvider();
10.
11.
using
(Stream output =
new
FileStream(fileName, FileMode.Create))
12.
{
13.
formatProvider.Export(workbook, output);
14.
}
When I check the size of each column in the exported file this is what I get:
column 1: 0.63 (10 pixels)
column 2: 4.00 (43 pixels)
column 3: 7.89 (78 pixels)
column 4: 0.63 (10 pixels)
and what I need is:
column 1: 8.11 (80 pixels)
column 2: 33.78 (311 pixels)
column 3: 60.67 (553 pixels)
column 4: 7.67 (76 pixels)
You can see the screenshot I attached.
How can I get the exact size I'm specifying?
Thank you,
PD: I'm using version Telerik 2019.1.114.40