Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Wed Sep 08, 2010 5:41 pm

when i make changes to the hyperlinks and save the excel sheet. Afterwods it is opend in excel 2010 "protected view". why is this?

aowen
 
Posts: 3
Joined: Tue Aug 10, 2010 1:26 pm

Fri Sep 10, 2010 4:53 am

thank for your inquiry.
Please make sure you open the file from safe location, unsafe locations include the user’s Temporary Internet Files folder and the downloaded program files folder.
User avatar

Flash
 
Posts: 56
Joined: Thu Jun 29, 2006 2:34 pm

Fri Oct 08, 2010 1:44 am

I'm trialling out the demo version (before purchasing) and I get the same problem - Spreadsheet is protected once I save it in the code.

The Spreadsheet resides in my "C:\Documents" folders which I'm sure is quite safe :-)

The Excel Spreadsheet is in 2003 format.

Also, is there any way to create more than 256 columns?

Would appreciate if you could help.

Regards,
Roshan

adaptive
 
Posts: 3
Joined: Fri Oct 08, 2010 12:57 am
Location: Melbourne, Australia

Fri Mar 25, 2011 1:53 pm

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.
Attachments
flgtest.zip
Spreadsheet and logo image
(10.3 KiB) Downloaded 526 times

FineLineGraphics
 
Posts: 1
Joined: Fri Mar 25, 2011 11:42 am

Mon Mar 28, 2011 5:35 am

Hi friend,

Thanks for your inquiry.
#1, When you open a Excel file from an Internet location and the file might be unsafe, you will get a protected view. Please check http://office.microsoft.com/en-us/excel ... aspx?CTT=1 for more details.

#2, Spire.XLS supports Excel 2007&2010. When you open/save an xlsx file, you should explicitly specify the file version. For example:
Code: Select all
Workbook wrk = new Workbook();
wrk.LoadFromFile(@"Template_Invoice_4over.xlsx", ExcelVersion.Version2010);

//...

wrk.SaveToFile(@"test.xlsx", ExcelVersion.Version2010);

A full demo was attached.

#3, About the extra line on the image, we could not reproduce. please see the attached demo.
#4, About the warning from Excel that it encountered corrupt data, we have reproduced it. When we save an xlsx to xls file, we could get the same warning message as yours. We suggest you to save your xlsx to xlsx. Some data structures in xlsx are not supported in xls file.
Attachments
InsertPicture.zip
(54.13 KiB) Downloaded 542 times
Justin
Technical Support / Developer,
e-iceblue Support Team
User avatar

leyou240
 
Posts: 1
Joined: Fri Mar 25, 2011 6:38 am

Return to Spire.XLS

cron