Comments (13)
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 [email protected]
on 16 Oct 2009 at 3:48
Attachments:
from excellibrary.
Errata
Should be
window2.IndexFirstVisibleRow = 0;
window2.IndexFirstVisibleColumn = 0;
0 is the first row/column
Original comment by [email protected]
on 16 Oct 2009 at 5:25
from excellibrary.
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 [email protected]
on 12 Nov 2009 at 9:50
from excellibrary.
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 [email protected]
on 15 Aug 2011 at 7:43
from excellibrary.
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 [email protected]
on 18 Jul 2012 at 5:17
from excellibrary.
What is your excel version?
Original comment by [email protected]
on 13 Sep 2012 at 5:24
from excellibrary.
Just commented on Issue 137. See if it fixes your problem.
Original comment by [email protected]
on 28 Sep 2012 at 8:43
from excellibrary.
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 [email protected]
on 19 Dec 2012 at 4:49
from excellibrary.
Corrected file "window2.cs". Also fixes issue 137.
Solved problem with Office 2013.
Not solved problem with office 2010.
Original comment by [email protected]
on 16 Apr 2013 at 10:08
Attachments:
from excellibrary.
Here is the recompiled ExcelLibrary with the fixed printing functionality.
Original comment by Arel.Celis
on 30 Sep 2014 at 8:23
Attachments:
from excellibrary.
[deleted comment]
from excellibrary.
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 [email protected]
on 29 Apr 2015 at 11:12
from excellibrary.
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 [email protected]
on 1 May 2015 at 1:46
Attachments:
from excellibrary.
Related Issues (20)
- how to insert hyperlink to excel sheet from application
- Generating excel files does not work on windows 8.1 excel 2013
- Signed Assembly
- Unable to read XLS file (file is corrupted) HOT 1
- File with less than 100 rows causes corruption
- Column size set
- I am unable to open the .xls files which I have created earlier. HOT 1
- Code to close the file?
- Load() give's me the error, Buffer cannot be null. I can't open excel files.
- me123
- put string to cell keyword not working
- WrapText issue
- Can't Read From Client Machine To Server Code
- How to set right align in excel cell
- aa
- aaa
- sss
- 222
- xlsx format
- Issue while opening excel file "Security Alert - Office File Validation"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from excellibrary.