Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
120
Don't reproduce RowLayout when copy Grid rows to Excel
posted

Hi community,

This is my problem: I have a Ultragrid in which I've used RowLayout to group Column Headers and all works fine in my grid, however when I copy the data by selecting all rows and then I paste them in excel 2007 sp2 the headers are pasted in only one row all columns including the "group columns", but one after the other (in sequence) without to reproduce the RowLayout :(.

In Grid (UltraWinGrid.v7.2):

Column 1 |                  Group 1                 |                  Group 2                 |

               | Detail 1.1 | Detail 1.2 | Detail 1.3| Detail 2.1 | Detail 2.2 | Detail 2.3|

 

But in excel I have:

Colum 1  | Group 1| Group 2 | Detail 1.1 | Detail 1.2 | Detail 1.3| Detail 2.1 | Detail 2.2 ...

Is there any solution?

Thanks for your help.

 

Parents
No Data
Reply
  • 1650
    posted

    This can be done programatically using the datatable methods.

     

    dataset.Tables("TABLENAME:").WriteXmlSchema(Replace(strFileName, ".XML", ".XSL"))

    dataset.Tables("TABLENAME").WriteXml(strFileName, True)

Children