I'm wanting to create a custom export type, but I can't seem to find any examples in the shared source code in the projects section. Does anyone know where I can find this?
Here is the source for the default export to csv one
public class ExportToExcel : ExportType {
public ExportToExcel() { this.Description = "Exports all data to a csv file"; this.Name = "CSV File"; this.Id = new Guid("94ED105A-87B3-4e1f-97CB-9A320AEE2745"); this.FileExtension = "csv"; }
Export Type Examples?
Hi,
I'm wanting to create a custom export type, but I can't seem to find any examples in the shared source code in the projects section. Does anyone know where I can find this?
Comment author was deleted
Hi Tim,
Here is the source for the default export to csv one
public class ExportToExcel : ExportType {
public ExportToExcel() {
this.Description = "Exports all data to a csv file";
this.Name = "CSV File";
this.Id = new Guid("94ED105A-87B3-4e1f-97CB-9A320AEE2745");
this.FileExtension = "csv";
}
private string xslt = Configuration.Path + "/xslt/excel.xslt";
public override string ExportForm(Form form)
{
RecordsViewer rv = new RecordsViewer();
XmlDocument xs = new XmlDocument();
XmlNode XmlRecords = rv.GetXmlRecords(form, xs);
rv.Dispose();
return XsltConvert(XmlRecords, HttpContext.Current.Server.MapPath(xslt));
}
}
Comment author was deleted
Basicly all export types are currently just an xslt transform
That's exactly what I was after, thanks Tim!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.