Free Support Forum -

System.NullReferenceException when saving workbook

I am evaluating cells and run into a NullReferenceException when opening and saving the attached xls file I want to use as a template. The following code can be used to reproduce the problem:

Dim book As New Workbook


book.Save(NewFilename, FileFormatType.Default)

Hope someone can help me with this one. Changing fileformat does not help, other templates work fine.

Exception details (part of it):

System.NullReferenceException was unhandled
Message="De objectverwijzing is niet op een exemplaar van een object ingesteld."
bij Aspose.Cells.Record.PaletteRecord.GetColorInPalette(Int32 index) bij Aspose.Cells.MsoDrawing.፛.ۋ(UInt16 ፶, Color ৏) bij Aspose.Cells.MsoFillFormat.get_ForeColor() bij Aspose.Cells.FillFormat.ଥ() bij Aspose.Cells.FillFormat.get_Pattern() bij Aspose.Cells.Record.⇆.⇊() bij Aspose.Cells.Record.⇆.᎔() bij Aspose.Cells.Record.⇆.set_ի(Area ԃ) bij Aspose.Cells.∘.∠(ASeries ॆ, Int32 ی, ChartType ֖) bij Aspose.Cells.∘.∝(ASeries ॆ, Int32 ی) bij Aspose.Cells.∘.∙() bij Aspose.Cells.℥.ℯ() bij Aspose.Cells.℥.ℨ(Chart ӕ) bij Aspose.Cells.MsoDrawing.ⅉ.⅍(Shape આ) bij Aspose.Cells.MsoDrawing.ⅉ.ე(Shape આ, Boolean ౱) bij Aspose.Cells.MsoDrawing.ⅉ.৒() bij Aspose.Cells.Worksheet.৒(৑ ۺ) bij Aspose.Cells.Worksheets.ଓ(৑ ۺ) bij Aspose.Cells.Worksheets.ଗ(FileFormatType କ) bij Aspose.Cells.Worksheets.৒(Stream ۺ, FileFormatType କ) bij Aspose.Cells.Workbook.Save(Stream stream, FileFormatType fileFormatType) bij Aspose.Cells.Workbook.Save(String fileName, FileFormatType fileFormatType)



Thanks for providing us the template file.

We found the issue after an initial test, we will fix it soon.

Thank you.


Please try this fix.

We have fixed this bug.

Thanks for the quick reply. In the mean time I had a better look at the licensing policy, and it turns out it is either too restrictive or too expensive for my goal, so I stopped my evaluation, sorry.