Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created February 12, 2019 22:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/176433d1c2db66e585fdcb56511b413a to your computer and use it in GitHub Desktop.
Save parzibyte/176433d1c2db66e585fdcb56511b413a to your computer and use it in GitHub Desktop.
<?php
# Obtener los datos de la base de datos
$codigo = $producto->codigo;
$descripcion = $producto->descripcion;
$precioCompra = $producto->precioCompra;
$precioVenta = $producto->precioVenta;
$existencia = $producto->existencia;
# Escribirlos en el documento
$hojaDeProductos->setCellValueByColumnAndRow(1, $numeroDeFila, $codigo);
$hojaDeProductos->setCellValueByColumnAndRow(2, $numeroDeFila, $descripcion);
$hojaDeProductos->setCellValueByColumnAndRow(3, $numeroDeFila, $precioCompra);
$hojaDeProductos->setCellValueByColumnAndRow(4, $numeroDeFila, $precioVenta);
$hojaDeProductos->setCellValueByColumnAndRow(5, $numeroDeFila, $existencia);
$numeroDeFila++;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment