When creating a data bar conditional formatting with middle axis, a plain data bar with left axis is created instead. Using the following code:
var dataBarValueContext = new DataBarValueContext
{
MaximumValue = new NumericValue(1),
MinimumValue = new NumericValue(-1)
};
// Create the rule and set the desired formatting
var rule = new DataBarRule(dataBarValueContext)
{
UseGradientFill = false,
Direction = DataBarDirection.Context,
FillColor = ThemableColor.FromColor(Colors.Green),
NegativeFillColor = ThemableColor.FromColor(Colors.Red),
ShowBarsOnly = true,
AxisPosition = DataBarAxisPosition.Automatic
};
var conditionalFormat = new ConditionalFormatting(rule);
worksheet.Cells[0, 0, 1, 0].AddConditionalFormatting(conditionalFormat);
worksheet.Cells[0, 0].SetValue(0.5);
worksheet.Cells[1, 0].SetValue(-0.5);
The expected value is this:
The result value is instead:
When a format string of type: _ * # ##0_ ;_ * -# ##0_ ;_ * "-"??_ ;_ @_ is set through code and the culture settings of the machine are set so that the number grouping symbol is space, the resulting format string comes out incorrect on export: _,*,# ##0_,;_,*,-# ##0_,;_,*,"-"??_,;_,@_,
This will happen every time the symbols in-between and after _ and * coincide with the number group separator.
Hi there I have a pdf and whenever I try to Import the PDF file into PdfFormatProvider.Import method for flattening purposes, it throws null reference exception.
I have added a sample .net project with PDF added as source. You just need to run the project on your end. I am using version 2023.3.1106 of document processing library.
I am using ASP.NET 4.8 framework.
Thanks
A NullReferenceException is thrown when copying a sheet containing a chart with Marker whose FIll is null.
There is a workaround which should be applied before copying the sheet:
foreach (FloatingChartShape chart in wsPureCompTemplate.Charts)
{
foreach (SeriesGroup seriesGroup in chart.Chart.SeriesGroups)
{
foreach (SeriesBase series in seriesGroup.Series)
{
LineSeries lineSeries = series as LineSeries;
if (lineSeries != null && lineSeries.Marker != null && lineSeries.Marker.Fill == null)
{
lineSeries.Marker.Fill = new NoFill();
}
ScatterSeries scatterSeries = series as ScatterSeries;
if (scatterSeries != null && scatterSeries.Marker != null && scatterSeries.Marker.Fill == null)
{
scatterSeries.Marker.Fill = new NoFill();
}
}
}
}