Open GoogleCodeExporter opened 9 years ago
You need to modify the library code to add Window2 record in Worksheet.
1. add Window2.cs in your library (Attached file)
2. In Record.cs, add those 2 lines in the switch statement
case RecordType.WINDOW2:
return new WINDOW2(record);
3. In WorkSheetEncoder.cs, add those lines after "records.Add(bof);"
WINDOW2 window2 = new WINDOW2();
window2.OptionFlags = 0x07be;
window2.IndexFirstVisibleRow = 1;
window2.IndexFirstVisibleColumn = 1;
window2.ColorIndex = 0;
window2.NotUsed1 = 0;
window2.CachedMagFactorPB = 0;
window2.CachedMagFactorNV = 0;
window2.NotUsed2 = 0;
records.Add(window2);
4. You must also add "window.ActiveWorksheet = 0;" in WorkbookEncoder.cs
This Window2 record is based on page 216-217 of the excelfileformat document.
I've looked into valid excel files to find the default flag (0x07be)
Hope this help you
Original comment by michel.h...@gmail.com
on 16 Oct 2009 at 3:48
Attachments:
Errata
Should be
window2.IndexFirstVisibleRow = 0;
window2.IndexFirstVisibleColumn = 0;
0 is the first row/column
Original comment by michel.h...@gmail.com
on 16 Oct 2009 at 5:25
Thanks, it works very well. Now the first Worksheet is active and selected and
i can
print it :)
Someone can close this issue.
Original comment by ingo.bor...@gmail.com
on 12 Nov 2009 at 9:50
The code in Comment 1, part 3 (WINDOW2 window2 = new WINDOW2; etc) should be
inserted just before the "EOF eof = new EOF();" statement. This will remove the
error message "Office File Validation detected a problem..." when opening the
xls-file.
Original comment by oyv...@rustan.no
on 15 Aug 2011 at 7:43
I still have the error message : Office File Validation.. after inserting
(WINDOW2 window2 = new WINDOW2;...) just before the "EOF eof = new EOF();".
Can it fixed?
Original comment by kyunga...@gmail.com
on 18 Jul 2012 at 5:17
What is your excel version?
Original comment by michel.h...@gmail.com
on 13 Sep 2012 at 5:24
Just commented on Issue 137. See if it fixes your problem.
Original comment by mrjames...@gmail.com
on 28 Sep 2012 at 8:43
Why is this not in the trunk of the project? The fix on this issue AND the fix
of Issue 137 where very useful in one of my project.
Thanks a lot.
Original comment by muffunke...@gmail.com
on 19 Dec 2012 at 4:49
Corrected file "window2.cs". Also fixes issue 137.
Solved problem with Office 2013.
Not solved problem with office 2010.
Original comment by marek.le...@gmail.com
on 16 Apr 2013 at 10:08
Attachments:
Here is the recompiled ExcelLibrary with the fixed printing functionality.
Original comment by Arel.Celis
on 30 Sep 2014 at 8:23
Attachments:
[deleted comment]
I have download the latest excelLibrary from above but still I am seeing same
"security alert office file validation". could someone please provide correct
dll
I am using Office 2007
Original comment by kumar...@googlemail.com
on 29 Apr 2015 at 11:12
I have done the changes described in the issue and works perfectly now.
I am attaching most recent compiled dll. This may help someone who is having
same issue
Original comment by kumar...@googlemail.com
on 1 May 2015 at 1:46
Attachments:
Original issue reported on code.google.com by
ingo.bor...@gmail.com
on 13 May 2009 at 1:30