We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Workbook not visible

Using this example I have run the code below but nothing appears in the form. I am missing something obvious.

The datatable definitely has rows and items and no errors appear. Pewrhaps I need to create some sort of object on the form

Sorry, I accidently posted this as a reply to an old issue

http://www.syncfusion.com/kb/1937/how-do-i-create-a-simple-spreadsheet-using-xlsio

Private Sub frmMaster_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Shown
     
 If DSMaster.Tables.Count = 0 Then
            GetSpreadsheet(MasterFile, DSMaster)
        End If

        ' A new instance of the Excel Application is created
        Dim excelEngine As New ExcelEngine()
        Dim application As IApplication = excelEngine.Excel
        application.DefaultVersion = ExcelVersion.Excel97to2003
        ' A new workbook object [bookOne] is created
        Dim bookOne As IWorkbook = excelEngine.Excel.Workbooks.Create(1)
        Dim sheet As IWorksheet = bookOne.Worksheets(0)

        sheet.ImportDataTable(DSMaster.Tables("Master"), True, 1, 1, -1, -1) ', True)
 
End Sub


5 Replies

DB Dilli Babu Nandha Gopal Syncfusion Team August 12, 2014 10:10 AM UTC

Hi Bill,

Thank you for using syncfusion product.

Please go through these link :



Check whether datatable contains values before passing it to ImportDatatable().

Please let us know if you have any concern.

Regards,
Dilli babu 


BP Bill Penrose August 12, 2014 10:32 AM UTC

Thank you for you help, however I do not think the problem is the datatable or the import statement. I have used the import statement many times to import to a worksheet then output the worksheet as an excel file.

The problem is that the code does not produce a visible worksheet. My guess is that there is no object for the form to display, so I see nothing on the form.




DB Dilli Babu Nandha Gopal Syncfusion Team August 13, 2014 05:50 AM UTC

Hi Bill,

Thanks for updating us.

The reported issue is not reproducing at our end. We request you to provide us a simplified issue reproducing sample or complete code snippets to assist with a prompt solution. 

We recommend you to provide the requested details about this issue in our Direct-Trac support.

Regards,
Dilli babu.


AL alexis April 5, 2021 04:28 PM UTC

A mi me sucede lo mismo el tema esta en que si se genera el archivo el problema esta es en que no lo hace visible osea debo ir a lo ruta donde se encuentra el archivo y abrirlo ya que el codigo no lo abre automaticamente solo lo guarda


KK Konduru Keerthi Konduru Ravichandra Raju Syncfusion Team April 6, 2021 06:15 AM UTC

Hi Alexis, 

Greetings from Syncfusion. 

We regret to let you know that we are unable to understand your query properly. We kindly request you to explain your query again, which will be helpful for us in looking into it and provide prompt solution at the earliest. 

Regards, 
Keerthi. 


Loader.
Live Chat Icon For mobile
Up arrow icon