RunExport(filename) method generates a System.UnauthorizedAccessException, Access to the path "C:\..." is denied. given that I`m the administrator and I`m able to export crystal report documents (all formats) with no issues at all. what could be the issue.
below is the sample code:
SaveFileDialog svd = new SaveFileDialog();
svd.FileName = "AnyThing";
svd.Filter = "Excel files (*.xls)|";
if (svd.ShowDialog() == DialogResult.OK)
{
PivotExportToExcelML exportExcel = new PivotExportToExcelML(radPivotGrid1);
exportExcel.ShowGridLines = true;
exportExcel.ExportVisualSettings = true;
exportExcel.HeaderCellsFont = new System.Drawing.Font("Arial", 8);
exportExcel.DataCellsFont = new System.Drawing.Font("Arial", 8);
exportExcel.GridLinesColor = Color.Black;
exportExcel.CellBackColor = Color.White;
exportExcel.SheetName = "Test";
exportExcel.ExportFlatData = false;
exportExcel.RunExport(Path.GetDirectoryName(svd.FileName));
}