Excel Export Splitting columns up

I have a Report viewer in ASP.NET.  I have a report displayed that works fine.  The report viewer has the option to export the data to an Excel file or PDF file.  When the user exports the file to Excel, Excel takes the lines of data and splits it up into 2 columns, as in the screen shot below.  I have all of the columns lined up in the Report in Visual Studio.  The columns are, however, in different matrices in Visual Studio.  Anyone have any ideas on how to get the data into one column?
LVL 15
melli111SharePoint Administrator / DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

melli111SharePoint Administrator / DeveloperAuthor Commented:
0
Saqib Husain, SyedEngineerCommented:
select cells E9:E30

right-click on the selection

select delete

select shift cells left
0
melli111SharePoint Administrator / DeveloperAuthor Commented:
I understand how to do that, my question was more along the lines of is there anything I can do programatically to fix this issue?  Or the alignment of the report elements in Visual Studio?  I want to do this as there are users who are not as proficient in Excel as you or I.
0
Amazon Web Services

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

Saqib Husain, SyedEngineerCommented:
Hello, I just found this question in my open questions. Do you want to continue with it?
0
melli111SharePoint Administrator / DeveloperAuthor Commented:
Yes, I would like to.  I have not found a solution yet.
0
Saqib Husain, SyedEngineerCommented:
Can you please upload a sample if they are all in a same format? If the format changes then send at least two so that I can see the variation.
0
Saqib Husain, SyedEngineerCommented:
Ok then without the sample try this macro


Sub Realign()
    For Each cel In Intersect(ActiveSheet.UsedRange, Range("G5:G" & ActiveSheet.Rows.Count))
    If cel.Value = "" And cel.Offset(0, 1).Value <> "" Then
        cel.Delete Shift:=xlToLeft
    End If
    Next cel
End Sub

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
melli111SharePoint Administrator / DeveloperAuthor Commented:
I've requested that this question be deleted for the following reason:

No longer needed
0
Saqib Husain, SyedEngineerCommented:
You asked for a solution and I gave it. You should either accept it or, if it does not work as expected, comment on it so that it may be addressed.
0
Saqib Husain, SyedEngineerCommented:
#35869182 works with the layout shown in the screenshot after the question
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.