When you click, what "more details" are provided?
> If Excel 2010 continues, only 1/2 of the generated file is displayed.
Half of the rows in each sheet? First half? second half? Odd or even
numbered rows? Half of the columns in each sheet? Half of the sheets? Does
the boundary coincide with anything in your data or code?
> If I open the generated file in Excel 2007 and do "save as", then
> Excel 2010 can open this new file without any problems.
>
> Does anyone know what part of the generated .xls file is problematic
> for Excel 2010?
Interesting links found by searching for "Protected View":
(1) http://support.microsoft.com/kb/973736
(2)
http://www.webtlk.com/2010/01/04/how-to-turn-off-protected-view-in-office-2010/
... try enabling only one of the four options at a time and tell us which
one is causing the issue.
(3)
http://blogs.technet.com/b/office2010/archive/2009/07/21/office-2010-application-security.aspx
(4)
http://office.microsoft.com/en-us/excel-help/what-is-file-block-HA010355927.aspx
Looks like it's a blanket inspection of all (or some -- admin configurable).
Can you create a simple (one cell) XLS file (save as XLS from Excel 2003
if you have it else from 2007) and try opening it in Excel 2010?
Anyone else out there with Excel 2010?
Cheers,
John
John Y.
Attached is a ZIP file containing 4 minimal XLS files, created by xlwt,
Excel 2003, OpenOffice.org, and Gnumeric.
Testers should try to open these with Excel 2010 and report the outcome:
(1) no dialogue box at all (2) opened in "protected view" (3) failed
validation (any reasons?) (4) something else ... plus the "Trust Center"
settings that are being used.
All four files opened up with (1) no dialog box at all for me.
There are a lot of Trust Center settings; is there some way to just
download them? The ones that seem most relevant to me are
Protected View:
Enable Protected View for files originating from the Internet (checked)
Enable Protected View for files located in potentially unsafe
locations (checked)
[The fact that the test files were extracted from the Zip to a trusted
location on my hard drive seems to defeat these measures.]
File Block Settings:
Open the following in Protected View: Excel 2, 3, and 4 Macrosheets
and Add-in Files; Excel 2, 3, and 4 Worksheets; Excel 4 Workbooks. No
open or save restrictions for any other file types.
If there are any other settings of interest, please let me know.
To Alan:
Is there any chance you can provide a file (without any sensitive or
illegal-to-transfer data) that is exhibiting the problematic behavior
you are seeing?
John Y.
Are you opening them from a folder that's not trusted e.g. "Downloads"?
> If I then click to continue editing, the first 25-30 rows are
> displayed and remaining rows are not displayed.
>
> I created a small test-case which generates Excel files which run fine
> in Excel 2007, but
> generate a "protected view" warning in Excel 2010.
> How do I attach these test case xls to this post?
Send an email to python...@googlegroups.com with the files as attachments.
Cheers,
John
Apparently, not with the insert_bitmap() method mentioned in the
tutorial. I've just tried it, with the same results you describe.
John Y.
The record type (IMDATA (0x7F)) used by xlwt, pyExcelerator, pyXLWriter,
and some perl package (see the genealogy at the start of xlwt/Bitmap.py)
was generated by versions of Excel earlier than 8.0. The world changed in
8.0. Instead of an OBJECT record and a (huge) IMDATA record at the end of
the relevant worksheet, you get a somewhat-smaller MSO_DRAWING_GROUP
(0xEB) in the workbook globals, and the worksheet has an MSO_DRAWING
(0xEC) followed by an OBJECT record.
Excel 97-2003, Excel 2007 and Open Office 3.x Calc will accept and display
the pre-8.0 format. If you save the file, they will write the 8.0-style
format. If you add a bitmap via the UI, they will add it in 8.0+ format.