Hello,
I just downloaded the toolset today and am doing a very basic test to see if it works for us, and I get the same Protected Mode error when openeing the file in Excel 2010.
My process is quite simple:
- Code: Select all
Workbook wrk = new Workbook();
wrk.LoadFromFile("D:\\Template_Invoice_4over.xls"); /// works fine, does not generate protected mode in excel
wrk.ActiveSheetIndex = 0;
ExcelPicture logo = wrk.ActiveSheet.Pictures.Add(Server.MapPath("/Images2/FineLine_Logo-217x100.gif"));
logo.Left = 15;
logo.Top = 15;
wrk.SaveToFile("D:\\test.xls"); /// saved file will cause protected mode warning in Excel :(
The resulting test.xls file opens in protected mode.
I tried using .xlsx format, but I get an exception about a missing root or something. Is the toolset capable of reading and writing .xlsx files?
Also, my original sheet had our logo image in it, but when the sheet is loaded and then saved by the tool set, a border (line) was added around the image.
One other thing -- every once in a while, when I try to open the saved sheet, I get a warning from Excel that it encountered corrupt data, but lets me recover.