Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
65
Open excel file from template to add ultrawebgrid export
posted

Hi,

 I would like add the ultrawebgrid export with UltraWebGridExcelExport in a excel template like this :

    Workbook oTemplate = Infragistics.Excel.Workbook.Load("Template.xls");  

    Worksheet ws = oTemplate.Worksheets.Add("deals");

    ExcelDealExporter.Export(dealsBlotter, ws);

I have this error :

 [NullReferenceException: Object reference not set to an instance of an object.] Infragistics.Excel.Serialization.EscherRecords.ClientData.Save(WorkbookSerializationManager manager) +161 Infragistics.Excel.Serialization.EscherRecords.EscherRecordContainerBase.Save(WorkbookSerializationManager manager) +107 Infragistics.Excel.Serialization.EscherRecords.EscherRecordContainerBase.Save(WorkbookSerializationManager manager) +107 Infragistics.Excel.Serialization.EscherRecords.EscherRecordContainerBase.Save(WorkbookSerializationManager manager) +107 Infragistics.Excel.Serialization.BiffRecords.MSODRAWINGRecord.Save(WorkbookSerializationManager manager) +34 Infragistics.Excel.Serialization.WorkbookSerializationManager.WriteRecord(BIFFType type) +108 Infragistics.Excel.Serialization.WorkbookSerializationManager.WriteWorksheetRecords(Worksheet worksheet, Boolean hasShapes) +546 Infragistics.Excel.Serialization.WorkbookSerializationManager.Save() +271 Infragistics.Excel.Workbook.Save(Stream stream) +706 Infragistics.Excel.BIFF8Writer.WriteWorkbookToStream(Workbook workbook, Stream outStream) +14

  
 I don't understand why ...

  
 

 

Parents
  • 60
    posted

    Hi, could you please explain me how to call a workbook which is already created and has data in it (same as your template file).

    I am dont know how to declare and import. Appreciate your help

Reply Children
No Data