Android Question Write to Exist Sheet on Excel workbook

Discussion in 'Android Questions' started by hibrid0, Jun 13, 2015.

  1. hibrid0

    hibrid0 Active Member Licensed User

    Hi, I have a excel book and I can read, that's very easy.
    Now I try to write some cells.

    I follow the tutorial and samples here.
    With this code I can create a new Workbook from the original workbook.

    Code:
    libro2.Initialize2(ruta_completa, "WORK.xls", libro1)


            respuestas_hoja=libro2.AddSheet(
    "0-Preguntas"0)

            celda.InitializeText(
    22"Hola Excel")
            respuestas_hoja.AddCell(celda)
    But this code create a new Sheet and write the cell, but with only that cell, no have the other sheet info, and I dont need create a sheet, in theory is copied from the original.
     
  2. hibrid0

    hibrid0 Active Member Licensed User

    Problem solved

    I see the WritetableBook GetSheet.

    Code:
    libro2.Initialize2(ruta_completa, "WORK.xls", libro1)

           
            respuestas_hoja=libro2.GetSheet(
    0)

            celda.InitializeText(
    22"Hola Excel")
            respuestas_hoja.AddCell(celda)
    Very easy, sorry.
     
    koaunglay and Peter Simpson like this.
Loading...