Visual Basic .NET Forums  
Click here to advertise with us

Go Back   Visual Basic .NET Forums > VB.NET > Third Party Products

Third Party Products Discussion on third party components for VB.NET

VB.NET Forums Newsletter Signup:
Email address:


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-04-2009, 5:50 AM
VB.NET Forum Newbie
.NET Framework: .NET 3.0 (VS 2005/2008)
 
Join Date: Jun 2009
Age: 29
Posts: 3
Reputation: 0
Susana is on a distinguished programming path ahead
Default Excel reports via VStudio 2005 - create groups?

Hi,
I have a problem while creating Excel reports using VS 2005. I am not able to create groups so the table can show colapsed groups, I mean, several rows contained in another one. Here I leave you the code I am trying to make it work. I will really appreciate any help you can provide


m_Excel.ActiveWindow.DisplayOutline = True

m_Excel.Range("A7:A16").OutlineLevel = 3
m_Excel.Range("A29:A40").OutlineLevel = 4
m_Excel.Range("A42:A50").OutlineLevel = 4
m_Excel.Range("A52:A57").OutlineLevel = 4
m_Excel.Range("A59:A60").OutlineLevel = 4
m_Excel.Range("A62:A70").OutlineLevel = 4
m_Excel.Range("A72:A77").OutlineLevel = 4
m_Excel.Range("A79:A80").OutlineLevel = 4
m_Excel.Range("A82:A85").OutlineLevel = 4
m_Excel.Range("A87:A88").OutlineLevel = 4

objHojaExcel.Range("A7:A88").group()
objHojaExcel.Outline.ShowLevels(4,0)

Kind regards.
Muchas gracia sy un saludo!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-09-2009, 7:25 AM
VB.NET Forum Newbie
.NET Framework: .NET 3.0 (VS 2005/2008)
 
Join Date: Jun 2009
Age: 29
Posts: 3
Reputation: 0
Susana is on a distinguished programming path ahead
Default

Hi again, I'd really appreciate if you could help me, as I am really stuck here, nobody could solve this problems in other forums, it's a challenge.

Group function definition:

Function Group(Optional ByVal Start As Object = Nothing, Optional ByVal End As Object = Nothing, Optional ByVal By As Object = Nothing, Optional ByVal Periods As Object = Nothing) As Object
Member of: Microsoft.Office.Interop.Excel.Range
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-14-2009, 3:17 PM
VB.NET Forum Enthusiast
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Apr 2008
Posts: 84
Reputation: 31
ggunter is on a distinguished programming path ahead
Default

Not really sure if this is what you are looking for but here's what I use. Only ran it on a few simple test but seemed to work ok.

Code:
Public Sub GroupRows(ByVal firstRow As Integer, ByVal lastRow As Integer)

    'select the rows you wish to group
    xlsRange = xlsApp.Range(firstRow.ToString & ":" & lastRow.ToString)
    xlsRange.Rows.Select()

    'group the rows
    xlsRange.Rows.Group()

End Sub
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





All times are GMT -4. The time now is 8:22 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2


For advertising opportunities click here.