This is a migrated thread and some comments may be shown as answers.

Split cell in Excel

3 Answers 255 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 28 May 2013, 06:49 PM
Hello,
I export a report to excel in my application.The report is completely dynamic.  
Now there is a need for me to split cells within a column.

I have for example two columns in my report dynamically created
Col A and Col B.
I want the Nth row in Column B to have 3 values and so split in to 3 cells. all the other rows in column B hold only one value.
Is it possible to do it dynamically in Telerik?
Or
will I be able to group 3 values and add it to a cell... each must be separately modifiable.
Thanks

3 Answers, 1 is accepted

Sort by
0
IvanY
Telerik team
answered on 31 May 2013, 10:43 AM
Hi David,

You can merge the cells of the table in the designer if that is your intent. Additionally you can use the Expression Editor to enter the values of three fields for example, like this:
=Fields.A + " " + Fields.B + " " + Fields.C

In your case it seems that both options are applicable. That is why you will need to provide us with additional details regarding your scenario if you need further assistance.

Regards,
IvanY
Telerik

Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

0
David
Top achievements
Rank 1
answered on 31 May 2013, 01:35 PM
The report is completely dynamic...
I have just the table with one row and one column in the designer and the complete report is formed dynamically hence merging the row in the designer will not work for me. Is there a way for me to merge them via code?

I want to be able to edit each of the values ... hence I cant concatenate them and place them in a single cell.

Hence we decided on a different layout for the report... but now...

I have 2 tables placed on the designer with one row and one column.
I make the data dynamically and fill in each of the tables (both the data source and the designer columns are added dynamically)
Bow tables have 4 columns
Now when I check the Excel
Tables col 1 shows up in col A of the spread sheet
Col 2 shows up on the Col B of the spread sheet(merged to a single cell)
Col 3 ... few tables show up on Col C and few on col D.
Col 4 shows up on col E.

Till row 5 is the first table and the rest are from table 2.
I had to use 2 tables because the column B- E are formatted as text in table one and as numbers in table 2.

I have attached a screen shot since i was not able to attach the excel here. If you need i can send the code also.
Why is this happening?

Thanks
0
Stef
Telerik team
answered on 05 Jun 2013, 01:15 PM
Hi David,

You can create programmatically merged cells (in fact whatever you can do with the designer you can do it with code too). First use the provided designers and wizards to create the Table item definition as you need it. Then get the generated code and reuse it in your custom methods for Table items creation.

Regarding your second scenario - it seems in your case that after column B ends another item, which is wider than the first and second columns combined, but shorter than the first, second and third. Therefore the third column of your table is split so that the wider element occupies A,B and C and your third column occupies C and D. What we can recommend you is to check the Design Considerations for Excel Rendering help article. 

Regards,
Stef
Telerik

Have you tried the new visualization options in Telerik Reporting Q1 2013? You can get them from your account.

Tags
General Discussions
Asked by
David
Top achievements
Rank 1
Answers by
IvanY
Telerik team
David
Top achievements
Rank 1
Stef
Telerik team
Share this question
or