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
200
Multiple Ultragrids export in Same workbook (in version: 6.0.20063.1091)
posted

Dim uWorkBook As WorkBook = Nothing

Dim sTempFileName As String = "krish.xls"

If uWorkBook Is Nothing Then

    If My.Computer.FileSystem.FileExists(sTempFileName) Then

        My.Computer.FileSystem.DeleteFile(sTempFileName)

    End If

    uWorkBook = mExcelExp.Export(mUltraGrid_ONE, sTempFileName)

    'THIS WILL EXPORT FIRST GRID TO WORKBOOK OBJECT, IN SHEET1

Else

    uWorkBook.Worksheets.Add("Sheet" & uWorkBook.Worksheets.Count + 1)

    uWorkBook = mExcelExp.Export(mUltraGrid_TWO, uWorkBook.Worksheets(uWorkBook.Worksheets.Count - 1))

    'I WANT SECOND GRID TO BE EXPORTED IN SECOND SHEET2, IN SAME WORKBOOK. And it does too. BUT when Process.Start command runs and opens the tile, it opens the excel file with only one sheet into it, i.e. with the first grid. When you see uWorkBook object in Watch window, you can see two sheets in there.

End If

System.Diagnostics.Process.Start(sTempFileName)

May be I am doine something wrong? !! ?? My company is using this version: 6.0.20063.1091. I don't have any Load or Save method in uWorkBook object. (This is in .Net 2.0 Framework)