Showing posts with label cells. Show all posts
Showing posts with label cells. Show all posts

Friday, February 17, 2012

Excel rendering problem(s)

I have a report containing a matrix.
The matrix cells contain a textbox with the data to display.
I need that textbox to appear only some times, so i wrote a function that
returns true or false depending on some field value that i pass as
parametter.
The report renders fine as PDF, but when i try to render it as XLS i get a
null refference error.
Does anyone know what the problem is ?
Also in another report i have 3 images in a cell (of a table or a matrix..
behave the same) and i set only one of them visible at a time based on other
fields values
in PDF also works fine, but when i try to render it in excel. Only one of
the images appear, and where the conditions call for one of the other two
images should
appear no image is visible.
The two problems might be related....
Thank you.
RazvanI had the same problem, it is a bug that Microsoft won't fix it.
Here's another one even worse, try exporting a report containing subreports
in Excel. None of the subreports will be rendered.
Needles to say all my clients want all their reports in Excel because it
allows them to easily do adhoc massages to their data.
Microsoft do you hear me, this is pretty basic stuff ! Fix it please!
Tzepesh
"Razvan Popov" wrote:
> I have a report containing a matrix.
> The matrix cells contain a textbox with the data to display.
> I need that textbox to appear only some times, so i wrote a function that
> returns true or false depending on some field value that i pass as
> parametter.
> The report renders fine as PDF, but when i try to render it as XLS i get a
> null refference error.
> Does anyone know what the problem is ?
> Also in another report i have 3 images in a cell (of a table or a matrix..
> behave the same) and i set only one of them visible at a time based on other
> fields values
> in PDF also works fine, but when i try to render it in excel. Only one of
> the images appear, and where the conditions call for one of the other two
> images should
> appear no image is visible.
> The two problems might be related....
> Thank you.
> Razvan
>
>

Excel Rendering Problem

When I render in Excel, the Excel cells do not grow to accomodate the cell
contents so data is hiding up, e.g. ABCD is not wrapping up as
AB
CD
but showing up as
AB
if the column width is small.
Anybody has seen this happen?
How to overcome this?
Thanks
SanjaySanjay,
I have experienced the same problem, but I cannot find any way for RS to
'instruct' excel to expand cells where required. Therefore this has to be
dealt with within the Excel app.
You will likely know the next part, but for those that do not: If you select
the whole worksheet, right click and turn on Word Wrapping, the rows will
expand virtically to display all the data. If you want the rows to remain the
same height, turn off WW and they will return to their original sizes. To
expand all columns, select whole worksheet, move the mousr along the top
column header bar until a double horizontal arrow appera, and double-click.
The columns will expand to their custom widths, dependant on what data is
contained in the column.
If you wish to automate this, and place in a macro, the following code will
assist you:
Cells.Select
Cells.EntireColumn.AutoFit
With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlBottom
.WrapText = True 'False to turn off
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
"Sanjay" wrote:
> When I render in Excel, the Excel cells do not grow to accomodate the cell
> contents so data is hiding up, e.g. ABCD is not wrapping up as
> AB
> CD
> but showing up as
> AB
> if the column width is small.
> Anybody has seen this happen?
> How to overcome this?
> Thanks
> Sanjay|||Thanks, Logicalman. Your post has been really useful. Can I cause a macro to
be included in a report server generated Excel spreadsheet?
I have several reports and this happens with only one of those reports. The
one report it happens with is modified from one of the reports with which
this doesn't happen. Something has changed in this rdl which is causing this
behavior. I was wondering if somebody knew what that change could be.
Thanks
Sanjay
"Logicalman" wrote:
> Sanjay,
> I have experienced the same problem, but I cannot find any way for RS to
> 'instruct' excel to expand cells where required. Therefore this has to be
> dealt with within the Excel app.
> You will likely know the next part, but for those that do not: If you select
> the whole worksheet, right click and turn on Word Wrapping, the rows will
> expand virtically to display all the data. If you want the rows to remain the
> same height, turn off WW and they will return to their original sizes. To
> expand all columns, select whole worksheet, move the mousr along the top
> column header bar until a double horizontal arrow appera, and double-click.
> The columns will expand to their custom widths, dependant on what data is
> contained in the column.
> If you wish to automate this, and place in a macro, the following code will
> assist you:
> Cells.Select
> Cells.EntireColumn.AutoFit
> With Selection
> .HorizontalAlignment = xlLeft
> .VerticalAlignment = xlBottom
> .WrapText = True 'False to turn off
> .Orientation = 0
> .AddIndent = False
> .IndentLevel = 0
> .ShrinkToFit = False
> .ReadingOrder = xlContext
> .MergeCells = False
> End With
>
> "Sanjay" wrote:
> > When I render in Excel, the Excel cells do not grow to accomodate the cell
> > contents so data is hiding up, e.g. ABCD is not wrapping up as
> > AB
> > CD
> >
> > but showing up as
> > AB
> >
> > if the column width is small.
> >
> > Anybody has seen this happen?
> > How to overcome this?
> >
> > Thanks
> > Sanjay|||Sanjay,
I apologise but that's the part I am still working on, the 'instruct' part.
I am certain it included in the URL used to create the Excel-formatted output.
One thing you say that may hold a key though is in the second para of your
reply '...one report it happens with is modified from one of the reports with
which this doesn't happen...', this leads me to belive that it is in the URL
of the export. I have taken the exporting to a level of simply placing a
button on a standard (or curently used) ASP page, and simply attaching the
URL to the Onclick event of the button.
You may take a look at the export part of the report you generate, this may
then hold the key to what is actually different between the two reports.
For myself, I would be more than interested in the results you get, as this
is just another step in my temas usage of RS to deliver ad-hoc reporting for
our current Intranet sites delivering mertics.
Please keep me informed of any progress there, and I will continue trying to
find the same answer also. I can be contacted via my email address, just
remove ALL the numbers from it first.
Thanks,
Tony
"Sanjay" wrote:
> Thanks, Logicalman. Your post has been really useful. Can I cause a macro to
> be included in a report server generated Excel spreadsheet?
> I have several reports and this happens with only one of those reports. The
> one report it happens with is modified from one of the reports with which
> this doesn't happen. Something has changed in this rdl which is causing this
> behavior. I was wondering if somebody knew what that change could be.
> Thanks
> Sanjay
> "Logicalman" wrote:
> > Sanjay,
> >
> > I have experienced the same problem, but I cannot find any way for RS to
> > 'instruct' excel to expand cells where required. Therefore this has to be
> > dealt with within the Excel app.
> > You will likely know the next part, but for those that do not: If you select
> > the whole worksheet, right click and turn on Word Wrapping, the rows will
> > expand virtically to display all the data. If you want the rows to remain the
> > same height, turn off WW and they will return to their original sizes. To
> > expand all columns, select whole worksheet, move the mousr along the top
> > column header bar until a double horizontal arrow appera, and double-click.
> > The columns will expand to their custom widths, dependant on what data is
> > contained in the column.
> >
> > If you wish to automate this, and place in a macro, the following code will
> > assist you:
> >
> > Cells.Select
> > Cells.EntireColumn.AutoFit
> > With Selection
> > .HorizontalAlignment = xlLeft
> > .VerticalAlignment = xlBottom
> > .WrapText = True 'False to turn off
> > .Orientation = 0
> > .AddIndent = False
> > .IndentLevel = 0
> > .ShrinkToFit = False
> > .ReadingOrder = xlContext
> > .MergeCells = False
> > End With
> >
> >
> >
> > "Sanjay" wrote:
> >
> > > When I render in Excel, the Excel cells do not grow to accomodate the cell
> > > contents so data is hiding up, e.g. ABCD is not wrapping up as
> > > AB
> > > CD
> > >
> > > but showing up as
> > > AB
> > >
> > > if the column width is small.
> > >
> > > Anybody has seen this happen?
> > > How to overcome this?
> > >
> > > Thanks
> > > Sanjay

Excel rendering - Merged cells issue

Hi,
My rendered Excel reports have lot of merged cells (because of the layout I
made in the designer). Therefore when I open it, the excel takes lot of
minutes to open. So the question is: what can I do in order to avoid having
merged cells in the rendered excel file.
TIA,
Gastón.-
PS: I've opened the excel file, unmerged all cells, save, reopen it, and the
problem disapear.Are you using table or matrix?
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Gastón Pírez" <gaspirez@.adinet.com.uy> wrote in message
news:O28R3kekFHA.1948@.TK2MSFTNGP12.phx.gbl...
> Hi,
> My rendered Excel reports have lot of merged cells (because of the layout
> I made in the designer). Therefore when I open it, the excel takes lot of
> minutes to open. So the question is: what can I do in order to avoid
> having merged cells in the rendered excel file.
> TIA,
> Gastón.-
> PS: I've opened the excel file, unmerged all cells, save, reopen it, and
> the problem disapear.
>
>|||I'm using table.
Thx,
Gastón.-
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:%23DTU3CfkFHA.576@.TK2MSFTNGP15.phx.gbl...
> Are you using table or matrix?
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
>
> "Gastón Pírez" <gaspirez@.adinet.com.uy> wrote in message
> news:O28R3kekFHA.1948@.TK2MSFTNGP12.phx.gbl...
>> Hi,
>> My rendered Excel reports have lot of merged cells (because of the layout
>> I made in the designer). Therefore when I open it, the excel takes lot of
>> minutes to open. So the question is: what can I do in order to avoid
>> having merged cells in the rendered excel file.
>> TIA,
>> Gastón.-
>> PS: I've opened the excel file, unmerged all cells, save, reopen it, and
>> the problem disapear.
>>
>|||OK, here is what I did. Do not have any textboxes above your table. Instead,
add additional header rows. You can merge cells together, put in text and
center so usually I could still get it where it looked similar. For some
reason even though you are merging cells it does it differently when
exporting to Excel. After doing this you will be able to select the data
region and sort the data.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Gastón Pírez" <paytrue@.newsgroup.nospam> wrote in message
news:uyDMNJfkFHA.1464@.TK2MSFTNGP14.phx.gbl...
> I'm using table.
> Thx,
> Gastón.-
> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
> news:%23DTU3CfkFHA.576@.TK2MSFTNGP15.phx.gbl...
>> Are you using table or matrix?
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>>
>> "Gastón Pírez" <gaspirez@.adinet.com.uy> wrote in message
>> news:O28R3kekFHA.1948@.TK2MSFTNGP12.phx.gbl...
>> Hi,
>> My rendered Excel reports have lot of merged cells (because of the
>> layout I made in the designer). Therefore when I open it, the excel
>> takes lot of minutes to open. So the question is: what can I do in order
>> to avoid having merged cells in the rendered excel file.
>> TIA,
>> Gastón.-
>> PS: I've opened the excel file, unmerged all cells, save, reopen it, and
>> the problem disapear.
>>
>>
>

Wednesday, February 15, 2012

Excel Merged Cells

Hi

I'm trying to eliminate merged cells when exporting a report to Excel. My problem being my report textbox above my table.

I've searched and found that making the textbox the same width as the first column eliminates the merging. Perfect, it does. But when the report is viewed in the report viewer, the textbox can only expand vertically. So the title looks terrible because column one is not wide.

I've read that expand horizontally is not an option I don't seem to be able to tell it not to output that text box, which would be an option if there is no other answer I can't have the text box the size I want it, due it creating merged cells I don't want to export it as a CSV

Are there any other options available or am missing something?

Cheers

You can try making the text box the same size as the first and second column or first second and third column if you need your textbox to be larger to accomodate its contents. It's not necessarily the size as much as that it aligns perfectly with one of the columns. I have had a really bad time with the merging of cells also. Sometimes I have to just handle it on the excel side by deleting the title out and then unmerging the merged columns.|||

Thanks for the reply KimberlyL. I tried this and it didn't work. I've tried it again today, making my title text box the width of 5 columns in my table and it still doesn't work, I get merged cells. If I make it the width of 4 columns then I don't get merged cells. So I've reduced the font size so it fits.

It's very strange, I wish I understood why, but at least it works for now

Cheers

|||

If you are exporting to Excel you can't really get rid of the cell merging, not unless you want to write your own renderer. I have read that the RS team is going to look at this problem sometime in the future.

I also had a customer who complained about this, he was trying to copy report values from one spreadsheet to another. In the end i just advised him on the quickest way to unmerge cells: press Ctrl+a, ctrl+1, select the Alignment tab, and deselect the merge cells checkbox. This has kept him quiet Smile

|||

That is what customers had been doing with this report too. But it's not ideal is it! I've also had to remove an image that was placed at the top right of the page header as alligning that up with columns, or anything else I can think of, still adds extra cells and merged cells.

But it does what I want it to do for now. I can see me revisiting this, I just hope the problem has been looked at before I need to!

|||I remember seeing on one of the blogs that sometimes no matter what you do that you can still end up with merged cells. Something about the internal math and rounding that the renderer does. Yes it is very frustrating. I hope that this is fixed in a future release.

Excel into Temp table and validations in SSIS

i have an excel sheet with about 30 columns of data ...i want to validate all the data in these cells of the excel through SSIS.
I want to get this data to a temporary table before running my validation stored proc...how do i get this data from the excel to the temp table , this temp table should accept all the data from the excel file in whatever form it is there should be no rows that get discarded while filling this table from the excel.
Moreever how do i get the column header data if the first row in the excel contains Column names how do i get these names and validate them if they are conferring to a
set of names.

Excel sheet ::

ColName1 ColName 2 ........ColName30

ColData11 ColData12..........ColData130

.....
..... ..... .. ...
..... ..... .. ...
Temp table ::

ColName1 ColName2 .. ...... ColName30 IsValid Description


Also can i do validations like Datatype and Length directly in SSIS ? or do i need to do it with a stored proc
Please Help....

Thanks
Clayton

Hi,

In SSIS, when you are transferring data from one Excel File to Another File you have to create an Excel Connection Manager for Source and Destination and in that you have an option as "First Row has Column Names".

But I am not sure about the validation at this point of time. Will verify and let you know that.

Thanks,

Prakash Srinivasan

Excel into Temp table and validations in SSIS

i have an excel sheet with about 30 columns of data ...i want to validate all the data in these cells of the excel through SSIS.
I want to get this data to a temporary table before running my validation stored proc...how do i get this data from the excel to the temp table , this temp table should accept all the data from the excel file in whatever form it is there should be no rows that get discarded while filling this table from the excel.
Moreever how do i get the column header data if the first row in the excel contains Column names how do i get these names and validate them if they are conferring to a
set of names.

Excel sheet ::

ColName1 ColName 2 ........ColName30

ColData11 ColData12..........ColData130

.....
..... ..... .. ...
..... ..... .. ...
Temp table ::

ColName1 ColName2 .. ...... ColName30 IsValid Description


Also can i do validations like Datatype and Length directly in SSIS ? or do i need to do it with a stored proc
Please Help....

Thanks
Clayton

Hi,

In SSIS, when you are transferring data from one Excel File to Another File you have to create an Excel Connection Manager for Source and Destination and in that you have an option as "First Row has Column Names".

But I am not sure about the validation at this point of time. Will verify and let you know that.

Thanks,

Prakash Srinivasan