#### Category : excel

I need to read an xlsx file that will have a sort of table with the menu of the week (Monday, Tuesday, Wednesday, etc). This table will be arranged vertically by day and horizontally by food (salad, protein, dessert, etc.). So, I need to capture the data by column and not by row, to generate ..

I have an issue write data vertically. I don’t know how to next column when finished a column. Please help me. Report example: My data: Thanks!!! Sourc..

I just doing project import excel using laravel. But there is an error when import / upload file excel and for web page can open and work. ErrorException Undefined array key 7 public function model(array $row) { return new Dso([ ‘id_dso’ =>$row[1], ‘id_rso’ => $row[2], ‘id_focus’ =>$row[3], ‘id_wilayah’ => $row[4], ‘id_grup_wilayah’ =>$row[5], ..

I’m still new in using Maatwebsite Excel. In this system, user will input date then when user export, it will display the date in a column. I want to set border for all row and column but I have no specific number of column for the header range. Below is the example: Details 2 Feb ..

I should see the rupee symbol on my webpage for the column. Invoice page: When I Download it through an Excel file the rupee symbol should be removed it should look like this Downloaded file: How do I do that? Sourc..

I was posting on last discussion, may be is no clear my problem. I’m apologize if I was created 2 same discussion And now I will attach all information including all code, I hope it can be fixed soon. and there is few part SiswaController.php, use AppExportsSiswaExport; use AppImportsSiswaImport; use MaatwebsiteExcelFacadesExcel; use AppHttpControllersController; class SiswaController ..

I’m trying to create product upload using excel file using maatwebsite in laravel I have written This code for data import if($request->hasFile(‘file’)) { Excel::import(new FoodImport, request()->file(‘file’)); } I also define use AppModelsFoodImport; use Excel; still it gives me error Class ‘AppModelsFoodImport’ not found Can anyone help what I’m missing !? Is there anything i need .. Read more In laravel excel export i have 7 columns. I need to add Row based on input.For example,if input is 360,totally 7 columns and first 3 columns contains 52 rows and rest 4 columns contains 51 rows. Sourc.. Read more When I’m importing data from uploaded xlsx, xls, or csv file into database from Laravel project. All extension got fails, none of them succeed in importing data into database. csv file isn’t getting any error on screen but fail store data into database, xlsx and xls is getting ‘undefined offset: 1’ result of dd($row), non ..

I’m using Laravel 8 and I have uploaded Excel file into the server. The name of the file is "data.xlsx" and it’s stored in /public/uploads. Inside the data.xlsx there are three columns with data. In my database I have already created a table called "promos". Inside that table there are three columns: id, name, code. ..

Is there a way to attach relationship in laravel directly in just one function? For example I had Three Table in Database: users(first table), user_role(relationship table), and roles(second table) In controller, AdminController.php I had this: public function import_student(Request $request) {$user = Auth::user(); $this->validate($request, [ ‘file’ => ‘required|mimes:csv,xls,xlsx’ ]); $file =$request->file(‘file’); $nama_file = rand().$file->getClientOriginalName(); ..

When I input the Excel file and submit it to import, what I got is error ‘Undefined offset: 1’ Error: Data in excel I want to input: Apparently, there’s already data on the table but I don’t know if it would affect the result or not: File that got the error -> jurusanImport.php use Appjurusan; ..

I have a large number of records in an excel sheet which is taking too much time while importing to the 3 tables in database. To overcome this issue, I am trying to import it through batch by creating small excel files with less data so that I run queue jobs of laravel on it. ..

after download user data the create at and update at aren’t show correctly in csv file is that from excel its self or from coding get all user funcion public static function GetAllUser(){ $result =DB::table(‘users’) ->select(‘name’, ’email’, ‘phone’, ‘membership_type’, ‘membership_status’, ‘last_activation_date’, ‘membership_end_date’, ‘future_id’, ‘temporary_id’, ‘tc_no_pasaport_no’, ‘place_of_birth’, ‘date_of_birth’, ‘educational_status’, ‘school_department’, ‘Institution_and_unit’, ‘address’, ‘referance_email’, ‘letter_of_Intent’,’created_at’,’updated_at’) ->get()->toArray(); return .. Read more I am using maatwebsite package in my laravel 8 project to download data form database as csv but i got this error when i call the downlood function from Excel from this link enter link description here Call to undefined method MaatwebsiteExcelExcel::downlood() the User Controller <?php namespace AppHttpControllersBackend; use AppHttpControllersController; use IlluminateHttpRequest; use Auth; use .. Read more I have a weird error when trying to import simple data through laravel excel. Here’s my import code: namespace AppImports; use AppContrato; use AppProvisional; use AppRecibo; use CarbonCarbon; use IlluminateDatabaseEloquentModel; use IlluminateSupportFacadesDB; use MaatwebsiteExcelConcernsToModel; use MaatwebsiteExcelConcernsWithHeadingRow; class RecibosFImport implements ToModel, WithHeadingRow { /** * @param array$row * * @return IlluminateDatabaseEloquentModel|null */ public function model(array ..

I’m trying to import data from excel file to database using laravel and maatwebsite excel package So I’m using the following code : class ProjectsImport implements ToModel,WithHeadingRow,WithValidation { use Importable; /** * @param array \$row * * @return IlluminateDatabaseEloquentModel|null */ public function rules(): array { return [ ‘nom’ => ‘required’, ‘prenom’ => ‘required’, ‘cine’ => ..

I’m trying to import data from excel file to database using maatwebsite excel package, I’m using the following code : namespace AppImports; use MaatwebsiteExcelFacadesExcel; use PhpOfficePhpSpreadsheetSpreadsheetSharedDate; use AppModelsCasting; use CarbonCarbon; use IlluminateSupportFacadesHash; use MaatwebsiteExcelConcernsToModel; use MaatwebsiteExcelConcernsToCollection; use IlluminateValidationRule; use MaatwebsiteExcelConcernsWithValidation; use MaatwebsiteExcelConcernsImportable; use MaatwebsiteExcelConcernsWithHeadingRow; use Auth; class ProjectsImport implements ToModel,WithHeadingRow,WithValidation { use Importable; /** * ..

this is the first time that I’m trying to import data from excel file to database using laravel. In my database table I have a int column , it takes 0 or 1 , But in My excel I have data like yes or no. How can I import this data as 0 or 1 ..

This is the first time that I tried to work with the Maatwebsite/Laravel-Excel package using Laravel 8. I’m trying to import data from excel file to database table. My table: But I have some difficulties or questions: In my database table I have a foreign keys, that means when I will import data I should ..

I am working with Laravel 5.8 with PHP version of 7.4 to develop my project, and in this project, I wanted to make an Excel file out of a table called students from View. So here is what I did: I typed composer require maatwebsite/excel at the Terminal and downloaded the package. I added MaatwebsiteExcelExcelServiceProvider::class, ..

I am working with Laravel 5.8 with PHP version of 7.4 to develop my project, and in this project, I wanted to make an Excel file out of a table called students. So here is what I did: I typed composer require maatwebsite/excel at the Terminal and downloaded the package. I added MaatwebsiteExcelExcelServiceProvider::class, in providers ..