Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How write at a end of file without deleting #7

Open
Asabbagh404 opened this issue May 29, 2020 · 2 comments
Open

How write at a end of file without deleting #7

Asabbagh404 opened this issue May 29, 2020 · 2 comments
Labels

Comments

@Asabbagh404
Copy link

Hi,

I'm trying to write at the end of a file without deleting the last one . Is it possible ?

Thank you

@ellumilel
Copy link
Owner

Hi, What do you mean by deleting the last one ?

@Asabbagh404
Copy link
Author

Is it possible to add content to an existing file ? Because when I use the function "writeToFile", it crush my file with the same name :

`<?php
require_once DIR . '/vendor/autoload.php';

$header = [
'nom' => 'string',
'prenom' => 'string',
'telephone' => 'string',
'email' => 'string',
];

$wExcel = new Ellumilel\ExcelWriter();
$wExcel->writeSheetHeader('Sheet1', $header);
$wExcel->setAuthor('Your name here');
$wExcel->writeSheetRow('Sheet1', [
$_POST['firstname'],
$_POST['lastname'],
$_POST['tel'],
$_POST['mail'],

]);

$wExcel->writeToFile("example.xlsx");
header("location:". $_SERVER['HTTP_REFERER']);
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants