all groups > dotnet interop > december 2007 >
You're in the

dotnet interop

group:

set_printquality bug in Excel.PageSetup


set_printquality bug in Excel.PageSetup robiman
12/14/2007 4:13:28 AM
dotnet interop:
I think I discovered a bug in set_printquality method in
Excel.PageSetup. Example:
....
Excel.Sheets xlsheets = wb.Sheets;
Excel.Worksheet excelWorksheet = (Excel.Worksheet)xlsheets[1];
Excel.PageSetup ps = excelWorksheet.PageSetup;
object x = ps.get_PrintQuality(1);

---> debug shows: x = 600.0 (the value from PrintQuality field in
Excel's "Page Setup" form)
---> debug shows: ps.CenterFooter = ""

x = 300.0;
ps.set_PrintQuality(x, Missing.Value);

---> debug shows: ps.CenterFooter = "300"

After saving the file, the PrintQuality field is not changed, but you
get a nice footer with value 300.

Re: set_printquality bug in Excel.PageSetup robiman
12/14/2007 4:19:56 AM
Sorry, I forgot to mention, I'm using:
..NET framework 2.0.50727.1433
Excel 2003 SP3 (11.8169.8172)
Microsoft Excel 11.0 Object Library 1.5.0.0
AddThis Social Bookmark Button