Solved

SSRS Export To Excel Creating A Blank Row

Posted on 2010-09-14
5
1,485 Views
Last Modified: 2012-06-27
Hmmm how to explain this.   I am exporting a report via SSRS 2005.  Now the Reprot seems fine but it seems to be adding a blank Row after each Ship to Group, Stopping me from doing a auto filter I have attached a picture of setup and the excel in question
commm.JPG
New.xls
0
Comment
Question by:gotti777
  • 3
  • 2
5 Comments
 
LVL 12

Accepted Solution

by:
sstampf earned 500 total points
Comment Utility
You can use the following code:

Sub sDeleteUnUsed()

Dim LastRow As Long, i As Long

Dim rng As Range

LastRow = Range("A65500").End(xlUp).Row

For i = 3 To LastRow

If Range("A" & i).End(xlToRight).Column = Columns.Count Then

If rng Is Nothing Then

Set rng = Range("A" & i).EntireRow

Else

Set rng = Union(rng, Range("A" & i).EntireRow)

End If

End If

Next i

rng.Delete

MsgBox "Done"

End Sub

Open in new window

0
 
LVL 12

Expert Comment

by:sstampf
Comment Utility
You can place the code I provided above in a blank excel file. After that you can open your "problem" file and then keeping the "problem" sheet active call my macro. Let me know if you have any questions.
0
 

Author Comment

by:gotti777
Comment Utility
I will try it out in the morning   I am going to run this report a lot will this code work all the time? Or just for this sheet
0
 
LVL 12

Expert Comment

by:sstampf
Comment Utility
It will work all the time.........
0
 

Author Closing Comment

by:gotti777
Comment Utility
Extra Step but works good thanks
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now