Solved

SSRS Export To Excel Creating A Blank Row

Posted on 2010-09-14
5
1,578 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 12

Accepted Solution

by:
sstampf earned 500 total points
ID: 33677397
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
ID: 33677530
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
ID: 33678020
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
ID: 33680183
It will work all the time.........
0
 

Author Closing Comment

by:gotti777
ID: 33695377
Extra Step but works good thanks
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

749 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