We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Behavior different if excel 2007

When I turn off grid lines, row headers and set styles on a worksheet it works find it the sheet is Excel97to2003. These same properties have NO affect if the sheet is added as Excel2007.

How do I get the grid lines off, row headers off and set styles if the workbook is Excel 2007? (I have saved the report as xlsx)

m_WorkBook = m_ExcelApp.Workbooks.Add(ExcelVersion.Excel2007);
m_WorkBook.Worksheets[0].IsGridLinesVisible = false;
m_WorkBook.Worksheets[0].IsRowColumnHeadersVisible = false;

IStyle headerStyle = m_WorkBook.Styles.Add(Utility.getColumnHeaderStyleName());
headerStyle.BeginUpdate();
headerStyle.WrapText = true;
headerStyle.Font.Bold = false;
headerStyle.Font.FontName = "MS Sans Serif";
headerStyle.Font.Size = 7;
headerStyle.VerticalAlignment = ExcelVAlign.VAlignCenter;
headerStyle.HorizontalAlignment = ExcelHAlign.HAlignCenter;
headerStyle.ColorIndex = ExcelKnownColors.Grey_25_percent;
headerStyle.EndUpdate();




1 Reply

GM Geetha M Syncfusion Team February 20, 2009 10:29 AM UTC

Hi,

Thank you for your interest in Syncfusion products.

Ability to toggle the visibility of row and column header for Excel 2007 format is yet to be supported by Essential XlsIO. Besides that, I was not able to reproduce the other problems. You could check the test sample in the link below:

http://websamples.syncfusion.com/samples/XlsIO.Windows/F79652/main.htm

Please try running the above sample and do let me know if you could see the same output as in the screenshot. Also please let me know the Essential Studio version which you are using.

Regards,
Geetha


Loader.
Live Chat Icon For mobile
Up arrow icon