Forum
Devx de Pivot Gridde ki bilgilerin exele aktarmaya çalışıyorum gridviewde ki gibi Gridviewexport tool ile yapmaya çalıştım ama olmadı, nasıl exele aktarabilirim .
Teşekkürler.
ool saveAs = true;
DevExpress.Utils.Paint.XPaint.ForceGDIPlusPaint();
using (MemoryStream stream = new MemoryStream())
{
ASPxPivotGridExporter1.OptionsPrint.PrintHeadersOnEveryPage = true;
ASPxPivotGridExporter1.OptionsPrint.PrintFilterHeaders = DevExpress.Utils.DefaultBoolean.True;
ASPxPivotGridExporter1.OptionsPrint.PrintColumnHeaders = DevExpress.Utils.DefaultBoolean.True;
ASPxPivotGridExporter1.OptionsPrint.PrintRowHeaders = DevExpress.Utils.DefaultBoolean.True;
ASPxPivotGridExporter1.OptionsPrint.PrintDataHeaders = DevExpress.Utils.DefaultBoolean.True;
string contentType = "", fileName = "";
fileName = "PivotGrid.xls";
ASPxPivotGridExporter1.ExportToXls(stream); // ---->> Exeption raises
byte[] buffer = stream.GetBuffer();
string disposition = saveAs ? "attachment" : "inline";
Response.Clear();
Response.Buffer = false;
Response.AppendHeader("Content-Type", contentType);
Response.AppendHeader("Content-Transfer-Encoding", "binary");
Response.AppendHeader("Content-Disposition", disposition + "; filename=" + fileName);
Response.BinaryWrite(buffer);
Response.End();
}
Çözümü Yukarıdaki gibidir.