Scriptcase 9.44/28/2024 ![]() $consulta= “SELECT id, nombre, apellido, edad, nacionalidad, profesion,sexo, nacimiento FROM dbo.tabla2” $productData->fromArray($header,null, “A1”) #El último argumento es por defecto A1 pero lo pongo para que seexplique mejor → The last argument is A1 by default but I put it to explain it better $header = //$encabezado changed to $header $productData = $document->getActiveSheet() //$hojaDeProductos #Como ya hay una hoja por defecto, la obtenemos, no la creamos Header(‘Content-Disposition:attachment filename="’. ![]() $documentName = “Mi primer archivo.xlsx” //$nombreDelDocumento changed to $documentName >setKeywords(‘etiquetas opalabras clave separadas por espacios’) >setDescription(‘Estedocumento fue generado para prueba’) >setLastModifiedBy(‘JuanAquino’) // última vez modificado por ->setTitle('Miprimer documento creado con PhpSpreadSheet') $document= new \PhpOffice\PhpSpreadsheet\Spreadsheet() //$documento changed to $document sc_include_library(“sys”,“PhpSpreadsheet”,“vendor/autoload.php”) Sc_include_library(“prj”,“PHPSSheet”,“vendor/autoload.php”) includesc_url_library(“prj”,“PHP”,“vendor/autoload.php”) The vendor folder or the autoload.php folder is not available in the library folder NOTE I Also tried directly using the external library (as sys). I just saved that library as a project library. It comes with the PHP Library bunded as external. C:\php\pear’) in C:\Program Files\NetMake\v9-php81\sc_include_library(‘prj’, ‘PHPSSheet’, ‘vendor/autoload…’) I am getting the following error and I am not able to locate the autoload.phpįailed opening required ‘…/_lib/libraries/grp/PHPSSheet/vendor/autoload.php’ (include_path=’. Parse error: syntax error, unexpected ‘=’ in C:\Program Files\NetMake\v9Jun18\Hi am sorry for asking this question after more than an year. ![]() $sheet->setCellValue(‘A1’, ‘Hello World !’) $spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet() includesc_url_library(“sys”,“PHPSpreadsheet”,“vendor/autoload.php”) sc_include_library(“sys”,“PHPSpreadsheet”,“vendor/autoload.php”) ‘/third/phpspreadsheet/vendor/autoload.php’) (I presume because the ‘use’ command in PHPSpreadsheet help, had to be deleted) I get a syntax error within the Spreadsheet class. $documento= new \PhpOffice\PhpSpreadsheet\Spreadsheet() ![]() I can get the lib to load, (I tried several different ways) but as soon as I try to use the first command: All of the pictures are missing (presumably because of the dumb reorganisation of the forum a few months ago!).A macro call (includesc_url_library) that as far as I know doesn’t exist.A link to an OLD version of PHPSpreadsheet.The HELP? item in the knowledge base is worse than useless… It has ![]() I can’t even get the basics to work… create an empty spreadsheet as per the PHPSpreadsheet help page.Įlsewhere in the forum it says the way that SC implements the tool, the USE functions cant be used (They have to be at the start of a script I think), but the workaround seems confused (at least I couldn’t understand it Been looking at migrating existing PHPExcel Spreadsheet (blank) apps to PHPSpreadsheet. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |