- Code: Select all
Workbook workbook = new Workbook();
workbook.LoadFromFile(fileInfo.FullName);
workbook.SaveToFile(Folder + "Mappe.pdf", Spire.Xls.FileFormat.PDF);
Inside a Windows Terminal Application everything looks fine, but if I copy the code into a Windows Service Application I am getting a "System.NullReferenceException" from LoadFromFile. My Excel Sheet contains a small jpg-Image with the following size 600x400. My Excel-sheet is only 66kB. Without the jpg-Image it works :(