Hi,
Thank you for your message.
I used the following code to test your document with the latest version (Spire. presentation 8.3.2), but I did not reproduce your problem. Are you using this version? If not, I recommend that you upgrade to the latest version to try again. If your problem still exists, please provide the following more information to us for further investigation.
1. Your complete test code
2. The target platform of your project(E.g. .NET framework 4.8 )
3. Your system information (E.g. Win10, 64 bit) and region setting (E.g. China, Chinese).
- Code: Select all
Presentation ppt = new Presentation();
ppt.LoadFromFile(@"sample.pptx");
if (ppt.Slides[0].Shapes[0] is IChart)
{
IChart chart = ppt.Slides[0].Shapes[0] as IChart;
for (int i = 0; i < 5; i++)
{
for (int j = 0; j < 5; j++)
{
if (chart.ChartData[i, j].Value.ToString().Trim().Length == 0)
{
chart.ChartData[i, j].Value = "";
Console.Write("***");
}
else
{
chart.ChartData[i, j].Value = chart.ChartData[i, j].Value;
}
Console.WriteLine(chart.ChartData[i, j].Value);
}
Console.WriteLine("======");
}
Console.ReadLine();
}
Best Regards,
Herman
E-iceblue support team