Hi,
I am getting exception in few cases when trying to read chart workbook and related properties. Need access to workbook to read and modify data effectively.
Method Chart.ChartData.ChartDataWorkbook.GetCell(1,1,1) is working but GetRange, GetCellCollection etc fails.
Code:
using (var p = new Presentation("/app/ppt/Testppt.pptx")) { foreach (var sld in p.Slides.ToList()) { var chs = sld.Shapes.OfType<Chart>().ToList(); chs.ForEach(ch => { try { ch.ChartData.GetRange(); } catch(Exception ex) { ; } }); } }
exception:
Chart data doesn’t have workbook reference.
at Aspose.Slides.Charts.ChartData.GetRange()
at DockerAspose.Controllers.WeatherForecastController.<>c.b__3_1(Chart ch) in C:\Users\mishra sarveshkumar\source\repos\DockerAspose\DockerAspose\Controllers\WeatherForecastController.cs:line 179
PPT Link: https://bcg01.egnyte.com/dl/SJHNfMiEhF
OS:
PRETTY_NAME=“Debian GNU/Linux 10 (buster)”
NAME=“Debian GNU/Linux”
VERSION_ID=“10”
VERSION=“10 (buster)”
VERSION_CODENAME=buster
ID=debian
HOME_URL=“https://www.debian.org/
”
SUPPORT_URL=“https://www.debian.org/support
”
BUG_REPORT_URL=“https://bugs.debian.org/
”
// aspose.slides : 21.5.0
// docker OS {Unix 5.4.72.2}
====Docker file content====
FROM mcr.microsoft.com/dotnet/aspnet:3.1 AS base
RUN apt-get update -y && apt-get install -y apt-utils
RUN apt-get install -y libgdiplus && apt-get install -y libc6-dev
Regards,
Sarvesh Mishra