Import excel file with relationship in Laravel - excel

I've encountered a problem with importing an excel file in Laravel. I have a single excel file with multiple columns and an ER Diagram as shown below. I want to import that excel file to my Laravel project and my MySQL database will receive the exact information and relationship in my ERD. (
excel
ERD)
I've searched and found Laravel Excel (maatwebsite/excel) but I quite don't know how to implement it in my problem. Is that package possible in my case? I'm looking forward to your reply.
I'm using Laravel 8 and maatwebsite/excel 3.1.
This is the first time I posted here so I'm not allow to import images. Sorry for that. Thanks and have a good day!

Yes you can definitively use laravel Excel package.
You can have a look at the documentation here: https://docs.laravel-excel.com/3.1/imports/basics.html
If I understand correctly you want your data to be imported into several models and managing the relationships so you'll have to import your data and then handle the imported data in your scripts by creating every model and adding the relationships to each.

Related

Read data from google sheets and dump into Postgres database using python and django

I have data on google sheets and I want to dump data into the Postgres database using python and Django.
Note that each row in a google sheet contains information for different tables like it could be a foreign key etc.
Am looking for any tutorial/blog to serve this purpose.
Try any of the resources below
https://xlsxwriter.readthedocs.io/
django-import-export: A widget that allows you to import excel files from admin section. It's very easy to install, here you find the installation tutorial, and here an example. https://django-import-export.readthedocs.io/en/latest/
You can also try this showing you how to import data into django
This also works.
Is this what you are looking for?

JHipster: how to import data from Excel file into my Entity in the database using Jhipster?

I'm new to JHipster and i'd like to add a button that allow me import Excel file to fill my entity in the database .
could anyone help me or give an idea
thank you
One way will be to define a table e.g. sourceFile which should have at least one field of type TextBlob. JHipster will create for you all the ui for uploading a file in the table sourceFile. Then u can create a service which is using a lib like apache poi for reading and importing the uploaded excel file. In this way u can write some audits about when the file was upload and imported. Of course it's depends on your use case if this is feasible or not for you.

SSIS 2012 with CozyRoc Data Flow task issue

I am working on SSIS 2012 with CozyRoc for Dynamic CRM data imports.
I have created a package and in that I have two Data Flow task(DFT1 & DFT2).
DFT1 imports all the prof questions using Excel file(ProfQuestions.xls) as Flat file source.
DFT2 imports all the prof questions answer using another excel file(ProfQuestionAns.xls) as Flat file source.
In DFT2 excel file(ProQuestionAns.xls) I have QuestionID and many other columns and which can be referred to DFT1 excel file(ProQuestions.xls) having QuestionID, QuestionText column.
My Requirement is-
If there is at least one answer, the system shall display all questions, including questions without answer.
a) If there are no answers, no questions shall be displayed.
Let’s say I have got 4 questions answer out of 10 Questions in ProfQuestionAns.xls data files. The questions only having any answers will be there in this file but what about other remaining 6 Questions which will not be present in this ProfQuestionAns.xls file. How can I load those questions which are not there in DFT2 ProQuestionAns.xls data files but are there in DFT1 ProQuestions.xls data files?
It looks like by calling DFT1 from DFT2 can work as I am not sure. Is it possible?
Any samples or solutions would be appreciated. Please Help me to achieve this.
Thanks
DK

How to read all excel and csv formats using node

I am working in building a project management tool,using MEAN(Mongodb,Expressjs,Angularjs,Nodejs) Stack.
I have a requirement in my project, where users will upload any kind of excel or csv format file and i need to parse each row from the file(excel|csv) and map it to my database model and save it has a mongodb document.I am trying to find an excel and csv parser library to accomplish my task.I also came accross xlsx, it looks good but it doesnt support reading csv files.It will be really helpful if any one could suggest a node.js library that can read all kinds of excel and csv file formats efficiently.Thanks in advance
At one point, I used Node CSV https://github.com/wdavidw/node-csv
to get the data inputted, it's really easy to use. Most of my users were fine with just having the CSV format option.....but you could combine the functionality of each library depending on the file type entered.....

CakePHP 2.1 excel file export and import to database

I am using cakephp 2.1 and developing an application which needed more data. I want to use excel file for import and export. Please suggest me some solutions to get it done.
Use Microsoft's "CSV for Excel" for importing data. It's the same as a generic CSV but then with different delimiters. If you want to create complex Excel sheets, then you should use something like PHPExcell.
The -1 on your question is for asking it wrongly. A quick Google Search would yield the same result as me typing this in...

Resources