Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
80
Using Infragistics Excel 8.3, OutlineLevel doesn't seem to work for Excel 2007
posted

 

Hi All,

 

We are currently using the version 8.3. Recently, we are required to support exporting our data to Excel 2007. We extensively use the groupings (OutlineLevel). When I tweaked my existing code to export data to Excel 2007 instead of 97-2003, the OutlineLevel does not seem to work.

 

Code snippet below:

 

Dim workBook As Workbook = New Workbook(WorkbookFormat.Excel2007, WorkbookPaletteMode.StandardPalette)

Dim workSheet As Worksheet = workBook.Worksheets.Add(details.DataSheetName)

            workSheet.Rows(0).Cells(0).Value = "Row 0, Cell 0"

            workSheet.Rows(0).OutlineLevel = 0

 

            workSheet.Rows(1).Cells(0).Value = "Row 1, Cell 0"

            workSheet.Rows(1).OutlineLevel = 1

 

            workSheet.Rows(2).Cells(0).Value = "Row 2, Cell 0"

            workSheet.Rows(2).OutlineLevel = 2

 

            workSheet.Rows(3).Cells(0).Value = "Row 3, Cell 0"

            workSheet.Rows(3).OutlineLevel = 3

Dim stream As New MemoryStream()
workBook.Save(stream)
Return stream
Can anyone tell me what I'm doing wrong?
Thanks!