-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 to save correctly? #35
Comments
After you have done your string replacements, you have to convert it to a nice array and give it to the Example of how the array should look $array = array(
array('A1','B1'),
array('A2','B2')
); Example of the Excel parts: // Load file into object
$object = Excel::load('file.xlsx')->toObject();
// Do your replace functions
// Convert to an array
// Export to excel
$excel = Excel::create('export_filename')
->sheet('sheetName')
->with($array)
->store('xlsx', false, true);
// Get the file to use it as attachment
$filename = $excel['full']; |
3 tasks
3 tasks
4 tasks
1 task
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Heres what I am trying to do and probably doing it all wrong! But is there a way to update the object then re-write/save it?
I have read the file in as an object type. Converted it to json did some string replacements on it then converted it back to an object. Now I want to take that object and save it back out with the new variables in it.
Other Info:
Basically I have a template xlsx file with things like {{goal0}} so I want to be able to replace those with actual values and save it so I can send out a mass email with it updated.
The text was updated successfully, but these errors were encountered: