| Usuario |
Modificar hoja excel desde vb.NET |
Desconocido
|
| Enviado - 21/9/2004 |
| |
| Alguien me puede decir como grabar datos en una hoja de calculo excel?, la hoja ya esta creada y tengo que acceder a ciertas celdas específicas para añadir datos y poder guardar la hoja conotro nombre. |
| |
|
Desconocido
|
| Enviado - 21/9/2004 |
| |
veamos si te sirve esto :
Worksheets("Nombre de tu hoja").Cells(y, x).Value |
| |
|
nostromo
389 Mensaje(s)
|
| Enviado - 22/9/2004 |
| |
Hola;
De un ejemplo complejo llegas al resultado:
'Agrega una referencia COM a "Microsoft Excel 10.0 Object Library"
Dim miExcel As Excel.Application
Dim miLibro As Excel.Workbook
Dim miHoja As Excel.Worksheet
Me.Cursor = Cursors.WaitCursor
miExcel = CreateObject("Excel.Application")
miExcel.Workbooks.Open("Archivo.xls", , False)
miExcel.ScreenUpdating = False
miExcel.Visible = True
Dim indice As Integer
miHoja = miExcel.Worksheets("Hoja1")
CantFilas = 100
Do While Cont <= CantFilas
sMail = miHoja.Range(Chr(CInt(65 + indice)) & Cont).Value
If sMail <> "" Then
If xObj.EsEmail(sMail) = "NO" Then
miHoja.Range(Chr(CInt(65 + indice)) & Cont).Interior.Color = QBColor(12)
'miHoja.Range(Chr(CInt(65 + (indice - 1))) & Cont).Value = ""
End If
End If
Cont = Cont + 1
Loop
miExcel.ScreenUpdating = True
miExcel.Workbooks.Close()
miExcel.Quit()
Me.Cursor = Cursors.Default
Nos vemos. |
| |
|