Gantt Chart Export Excel Feature Not Working
Hi Syncfusion Team,
I was trying to implement the Export to Excel feature of the Gantt chart component, but the operation does not work. Instead, it produces the exception message below.
at Syncfusion.Blazor.Grids.Internal.GridExcelExport`1.System.IDisposable.Dispose()
at Syncfusion.Blazor.Grids.SfGrid`1.ExcelExport(ExcelExportProperties excelExportProperties, Nullable`1 isMultipleExport, Object workbook, Nullable`1 isBlob)
at Syncfusion.Blazor.Grids.Internal.GridExcelExport`1.System.IDisposable.Dispose()
at Syncfusion.Blazor.Grids.SfGrid`1.ExcelExport(ExcelExportProperties excelExportProperties, Nullable`1 isMultipleExport, Object workbook, Nullable`1 isBlob)
at Syncfusion.Blazor.TreeGrid.SfTreeGrid`1.ExcelExport(ExcelExportProperties excelExportProperties, Nullable`1 isMultipleExport, Object workbook, Nullable`1 i
sBlob)
at Syncfusion.Blazor.Gantt.SfGantt`1.ExportToExcelAsync(ExcelExportProperties excelExportProperties)
at <Application>.Pages.Test.Sample.ExportCalendarToExcel() in <ApplicationDirectory>\Pages\Test\Sample.ra
zor:line 172
I did a quick debug but the Gantt object is not null nor the ExportProperties object.
One thing to note is that I'm not using the toolbar click event to trigger the Export operation but rather on a simple button click. I'm not sure how much of an impact that entails but we are not using the Gantt chart's toolbar generally.
Please advise as to how to resolve this issue. I'm attaching the razor page file where I'm experiencing the issue.
Many thanks!
Denzel
Attachment: Syncfusion_Query__Gantt_Chart_Export_to_Excel_not_working_c3233ddb.zip
|
<SfGantt @ref="Gantt"
DataSource="@TaskCollection"
ProjectStartDate="@ProjectStart"
ProjectEndDate="@ProjectEnd"
GridLines="Syncfusion.Blazor.Gantt.GridLine.Both"
Height="600px"
TaskMode="ScheduleMode.Manual"
AllowExcelExport="true"
AllowUnscheduledTasks="true"
AllowFiltering="true">
|
Hi Monisha,
Thank you! I missed the AllowExcelExport property from the article as they have emphasized the ExportToExcelAsync() method more.
Anyway, the export function is now working on my end as well. Thank you for pointing out what I'm missing in code.
Best regards,
Denzel
- 3 Replies
- 2 Participants
- Marked answer
-
RS Roy Sunga
- Sep 9, 2021 04:47 PM UTC
- Sep 13, 2021 05:00 AM UTC