load->library('myspreadsheet'); $spreadsheet = $CI->myspreadsheet->getMySpreadSheet(); $sheet = $spreadsheet->getActiveSheet(); $sheet->setCellValue('A1', 'Second Hello World !'); $sheet->setTitle('Address Form datas'); $myWorkSheet = new \PhpOffice\PhpSpreadsheet\Worksheet\Worksheet($spreadsheet, 'My Data'); // Attach the "My Data" worksheet as the first worksheet in the Spreadsheet object $spreadsheet->addSheet($myWorkSheet, 0); $writer = $CI->myspreadsheet->getXlsx($spreadsheet); $writer->save(XLPATH.'/tmp/SecondTest.xls'); } public static function Fns2($requested_details) { log_message('ERROR','####RequestDataDump Helper FNS1'); log_message('ERROR','####Creating Test Excel'); $CI =&get_instance(); $CI->load->library('myspreadsheet'); SELF::$current_spreadsheet = $CI->myspreadsheet->getMySpreadSheet(); $sheet = SELF::$current_spreadsheet->getActiveSheet(); $sheet->setCellValue('A1', 'Second Hello World !'); $sheet->setTitle('Address Form datas'); SELF::$current_spreadsheet->setActiveSheetIndex(0)->setTitle('My Data'); // Attach the "My Data" worksheet as the first worksheet in the Spreadsheet object SELF::$current_spreadsheet->addSheet($myWorkSheet, 0); $writer = $CI->myspreadsheet->getXlsx(SELF::$current_spreadsheet); $writer->save(XLPATH.'/tmp/ThridTest.xls'); } public static function multiple_spreadsheet($r) { $CI =&get_instance(); $CI->load->library('myspreadsheet'); // header('Content-Type: application/vnd.ms-excel'); // header('Content-Disposition: attachment;filename=myexcel.xlsx'); $spreadsheet = $CI->myspreadsheet->getMySpreadSheet(); $spreadsheet->setActiveSheetIndex(0)->setCellValue('A1','service worksheet'); $spreadsheet->getActiveSheet()->setTitle('Service'); $spreadsheet->createSheet(); $spreadsheet->setActiveSheetIndex(1)->setCellValue('A1','New Worksheet'); $spreadsheet->getActiveSheet()->setTitle('Product1'); $spreadsheet->createSheet(); $spreadsheet->setActiveSheetIndex(2)->setCellValue('A1','New Worksheeet'); $spreadsheet->getActiveSheet()->setTitle('Product2'); $spreadsheet->createSheet(); $spreadsheet->setActiveSheetIndex(3)->setCellValue('A1','New Workshet'); $spreadsheet->getActiveSheet()->setTitle('Product3'); $spreadsheet->createSheet(); $spreadsheet->setActiveSheetIndex(4)->setCellValue('A1','New Workshheet'); $spreadsheet->getActiveSheet()->setTitle('Product4'); // $spreadsheet->setActiveSheetIndex(0); $writer = $CI->myspreadsheet->getXlsx($spreadsheet); $writer->save(XLPATH.'/tmp/PDExportXL_f.xls'); } public static function createzip(){ // Load zip library $CI =&get_instance(); $CI->load->library('zip'); $files = array("PDExportXL.xls","PDExportXL2.xls","PDExportXL2.xls"); foreach ($files as $row) { $fileName = XLPATH."/tmp/".$row; $CI->zip->read_file($fileName); } $filename = XLPATH."/tmp/backup.zip"; $CI->zip->download($filename); } // public static function createzip2(){ // // Load zip library // $CI =&get_instance(); // $CI->load->library('zip'); // $files = array("PDExportXL.xls","PDExportXL2.xls","PDExportXL2.xls"); // // Write the zip file to a folder on your server. Name it "my_backup.zip" // $CI->zip->archive(XLPATH."/tmp/); // // Download the file to your desktop. Name it "my_backup.zip" // $filename = XLPATH."/tmp/backup.zip"; // $CI->zip->download($filename); // } public static function Fns4($requested_details) { log_message('ERROR','####RequestDataDump Helper FNS2'); log_message('ERROR','####Creating Test Excel'); $CI =&get_instance(); $CI->load->library('myspreadsheet'); SELF::$current_spreadsheet = $CI->myspreadsheet->getMySpreadSheet(); $formid_arr = array(); for($i=0;$i < count($requested_details);$i++){ $processedJson = json_decode($requested_details[$i]['processed_json'],TRUE); $formid = $processedJson['formid']; // echo " ".$formid." "; if (!in_array($formid, $formid_arr)){ array_push($formid_arr,(int)$formid); } } sort($formid_arr); SELF::formHeadlines($formid_arr); $writer = $CI->myspreadsheet->getXlsx(SELF::$current_spreadsheet); $filename = "PDExportXL_".date('Y-m-d H:i:s A').".xls"; $writer->save(XLPATH.'/tmp/'.$filename); // $numbers = array(4, 6, 2, 22, 11);sort($numbers); // print_r($numbers); // print_r($formid_arr);die(); for($i=0;$i < count($requested_details);$i++){ $processedJson = json_decode($requested_details[$i]['processed_json'],TRUE); // print_r($processedJson);die(); // echo "Don't Worry Be happy because i have JSON"; $formid = $processedJson['formid']; switch($formid) { // case 1: ## '1', 'Supplier Details' // $details = SELF::gatheringSupplierForm($processedJson); // // $sheet->setTitle('Supplier Details'); // $sheet->setActiveSheetIndex(0)->setCellValue('A1','Supplier Details'); // $sheet->getActiveSheet()->setTitle('Supplier Details'); // break; // case 2: ## '2', 'Client Details' // $details = SELF::gatheringClientForm($processedJson); // $sheet->createSheet(); // $sheet->setActiveSheetIndex(1)->setCellValue('A1', 'Client Details !'); // $sheet->getActiveSheet()->setTitle('Client Details'); // break; // case 3: ## '3', 'Personal Details' // $details = SELF::gatheringPersonalForm($processedJson); // $sheet->createSheet(); // $sheet->setActiveSheetIndex(2)->setCellValue('A1', 'Personal Details !'); // $sheet->getActiveSheet()->setTitle('Personal Details'); // break; // case 4: ## '4', 'Other Assets' // $details = SELF::gatheringOtherAssetForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Other Assets'); // break; // case 5: ## '5', 'Address Details' // $details = SELF::gatheringAddressForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Address Details'); // break; // case 6: ## '6', 'Family Details' // $details = SELF::gatheringOtherFamilyDetailsForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Family Details'); // break; // case 7: ## '7', 'Banking Details' // $details = SELF::gatheringBankingInfoForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Banking Details'); // break; // case 8: ## '8', 'Existing Loan Obligations' // $details = SELF::gatheringExistingLoanDetailsForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Existing Loan Obligations'); // break; // case 9: ## '9', 'Other Income Details' // $details = SELF::gatheringOtherIncomeDetailsForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Other Income Details'); // break; // case 10: ## '10', 'Loan Details' // $details = SELF::gatheringLoanDetailsForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Loan Details'); // break; // case 11: ## '11', 'Stock Details' // $details = SELF::gatheringStockDetailsForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Stock Details'); // break; // case 12: ## '12', 'Employment Information' // $details = SELF::gatheringEmploymetForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Employment Information'); // break; // case 13: ## '13', 'Business Information' // $details = SELF::gatheringBusinessForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Business Information'); // break; // case 14: ## '14', 'Financial Information' // $details = SELF::gatheringFinancialInfoForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Financial Information'); // break; // case 15: ## '15', 'Lender Representative' // $details = SELF::gatheringLenderRepresentativeForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Lender Representative'); // break; // case 16: ## '16', 'Assessed Income' // $details = SELF::gatheringAssessedIncomeForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Assessed Income'); // break; // case 17: ## '17', 'Rental Verification' // $details = SELF::gatheringRentalIncomeForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Rental Verification'); // break; // case 18: ## '18', 'General Information' // $details = SELF::gatheringGeneralInfoForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('General Information'); // break; // case 19: ## '19', 'Neighbourhood / Reference Check' // $details = SELF::gatheringNeighbourForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Neighbourhood and Ref Check'); // break; // case 20: ## '20', 'Final Remarks Form' // $details = SELF::gatheringFinalRemarksForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Final Remarks Form'); // break; // case 21: ## '21', 'Business Banking' // $details = SELF::gatheringBusinessBankingFormForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Business Banking'); // break; // case 22: ## '22', 'Business Assets' // $details = SELF::gatheringBusinessAssetsForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Business Assets'); // break; // case 23: ## '23', 'Future Plan and Business Environment' // $details = SELF::gatheringFuturePlanandBusinessEnvironmentForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Future Plan'); // break; // case 24: ## '24', 'Credit Manager Queries' // $details = SELF::gatheringCreditManagerQueriesForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Credit Manager Queries'); // break; // case 25: ## '25', 'Vendor PD Form' // $details = SELF::gatheringVendorPDForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Vendor PD Form'); // break; // case 26: ## '26', 'Photograph' // $details = SELF::gatheringPhotographForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Photograph'); // break; // default: ## // echo "Final - No Form ID";break; }// Switch ends here }// for loop ends here $writer = $CI->myspreadsheet->getXlsx(SELF::$current_spreadsheet); $filename = "PDExportXL_".date('Y-m-d H:i:s A').".xls"; $writer->save(XLPATH.'/tmp/'.$filename); }// fns2 ends here public static function Fns5($requested_details) { log_message('ERROR','####RequestDataDump Helper FNS2'); log_message('ERROR','####Creating Test Excel'); $CI =&get_instance(); $CI->load->library('myspreadsheet'); SELF::$current_spreadsheet = $CI->myspreadsheet->getMySpreadSheet(); $formid_arr = array(); for($i=0;$i < count($requested_details);$i++){ $processedJson = json_decode($requested_details[$i]['processed_json'],TRUE); $formid = $processedJson['formid']; // echo " ".$formid." "; if (!in_array($formid, $formid_arr)){ array_push($formid_arr,(int)$formid); } } sort($formid_arr); SELF::formHeadlines($formid_arr); $writer = $CI->myspreadsheet->getXlsx(SELF::$current_spreadsheet); $filename = "PDExportXL_".date('Y-m-d H:i:s A').".xls"; $writer->save(XLPATH.'/tmp/'.$filename); // $numbers = array(4, 6, 2, 22, 11);sort($numbers); // print_r($numbers); // print_r($formid_arr);die(); for($i=0;$i < count($requested_details);$i++){ $processedJson = json_decode($requested_details[$i]['processed_json'],TRUE); // print_r($processedJson);die(); // echo "Don't Worry Be happy because i have JSON"; $formid = $processedJson['formid']; switch($formid) { // case 1: ## '1', 'Supplier Details' // $details = SELF::gatheringSupplierForm($processedJson); // // $sheet->setTitle('Supplier Details'); // $sheet->setActiveSheetIndex(0)->setCellValue('A1','Supplier Details'); // $sheet->getActiveSheet()->setTitle('Supplier Details'); // break; // case 2: ## '2', 'Client Details' // $details = SELF::gatheringClientForm($processedJson); // $sheet->createSheet(); // $sheet->setActiveSheetIndex(1)->setCellValue('A1', 'Client Details !'); // $sheet->getActiveSheet()->setTitle('Client Details'); // break; // case 3: ## '3', 'Personal Details' // $details = SELF::gatheringPersonalForm($processedJson); // $sheet->createSheet(); // $sheet->setActiveSheetIndex(2)->setCellValue('A1', 'Personal Details !'); // $sheet->getActiveSheet()->setTitle('Personal Details'); // break; // case 4: ## '4', 'Other Assets' // $details = SELF::gatheringOtherAssetForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Other Assets'); // break; // case 5: ## '5', 'Address Details' // $details = SELF::gatheringAddressForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Address Details'); // break; // case 6: ## '6', 'Family Details' // $details = SELF::gatheringOtherFamilyDetailsForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Family Details'); // break; // case 7: ## '7', 'Banking Details' // $details = SELF::gatheringBankingInfoForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Banking Details'); // break; // case 8: ## '8', 'Existing Loan Obligations' // $details = SELF::gatheringExistingLoanDetailsForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Existing Loan Obligations'); // break; // case 9: ## '9', 'Other Income Details' // $details = SELF::gatheringOtherIncomeDetailsForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Other Income Details'); // break; // case 10: ## '10', 'Loan Details' // $details = SELF::gatheringLoanDetailsForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Loan Details'); // break; // case 11: ## '11', 'Stock Details' // $details = SELF::gatheringStockDetailsForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Stock Details'); // break; // case 12: ## '12', 'Employment Information' // $details = SELF::gatheringEmploymetForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Employment Information'); // break; // case 13: ## '13', 'Business Information' // $details = SELF::gatheringBusinessForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Business Information'); // break; // case 14: ## '14', 'Financial Information' // $details = SELF::gatheringFinancialInfoForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Financial Information'); // break; // case 15: ## '15', 'Lender Representative' // $details = SELF::gatheringLenderRepresentativeForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Lender Representative'); // break; // case 16: ## '16', 'Assessed Income' // $details = SELF::gatheringAssessedIncomeForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Assessed Income'); // break; // case 17: ## '17', 'Rental Verification' // $details = SELF::gatheringRentalIncomeForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Rental Verification'); // break; // case 18: ## '18', 'General Information' // $details = SELF::gatheringGeneralInfoForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('General Information'); // break; // case 19: ## '19', 'Neighbourhood / Reference Check' // $details = SELF::gatheringNeighbourForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Neighbourhood and Ref Check'); // break; // case 20: ## '20', 'Final Remarks Form' // $details = SELF::gatheringFinalRemarksForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Final Remarks Form'); // break; // case 21: ## '21', 'Business Banking' // $details = SELF::gatheringBusinessBankingFormForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Business Banking'); // break; // case 22: ## '22', 'Business Assets' // $details = SELF::gatheringBusinessAssetsForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Business Assets'); // break; // case 23: ## '23', 'Future Plan and Business Environment' // $details = SELF::gatheringFuturePlanandBusinessEnvironmentForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Future Plan'); // break; // case 24: ## '24', 'Credit Manager Queries' // $details = SELF::gatheringCreditManagerQueriesForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Credit Manager Queries'); // break; // case 25: ## '25', 'Vendor PD Form' // $details = SELF::gatheringVendorPDForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Vendor PD Form'); // break; // case 26: ## '26', 'Photograph' // $details = SELF::gatheringPhotographForm($processedJson); // SELF::$current_spreadsheet->setActiveSheetIndex($formid)->setTitle('Photograph'); // break; // default: ## // echo "Final - No Form ID";break; }// Switch ends here }// for loop ends here $writer = $CI->myspreadsheet->getXlsx(SELF::$current_spreadsheet); $filename = "PDExportXL_".date('Y-m-d H:i:s A').".xls"; $writer->save(XLPATH.'/tmp/'.$filename); }// fns5 ends here public static function formHeadlines($formid_arr){ $i=0; $arr = sort($formid_arr); $sheet = SELF::$current_spreadsheet; foreach($formid_arr as $data) { switch($data){ case 1: ## '1', 'Supplier Details' $sheet->setActiveSheetIndex($i)->setCellValue('A1','Supplier Details'); $sheet->getActiveSheet()->setTitle('Supplier Details'); break; case 2: ## '2', 'Client Details' $sheet->createSheet(); $sheet->setActiveSheetIndex($i)->setCellValue('A1', 'Client Details !'); $sheet->getActiveSheet()->setTitle('Client Details'); break; case 3: ## '3', 'Personal Details' $sheet->createSheet(); $sheet->setActiveSheetIndex($i)->setCellValue('A1', 'Personal Details !'); $sheet->getActiveSheet()->setTitle('Personal Details'); break; case 4: ## '4', 'Other Assets' $sheet->createSheet(); $sheet->setActiveSheetIndex($i)->setCellValue('A1', 'Client Details !'); $sheet->getActiveSheet()->setTitle('Other Assets'); break; case 5: ## '5', 'Address Details' $sheet->createSheet(); $sheet->setActiveSheetIndex($i) ->setCellValue('A1', 'PDID') ->setCellValue('B1', 'Address at which PD was initiated') ->setCellValue('C1', 'City') ->setCellValue('D1', 'State') ->setCellValue('E1', 'Pincode') ->setCellValue('F1', 'Specify other pincode') ->setCellValue('G1', 'Is this the address where PD is done') ->setCellValue('H1', 'Enter actual PD address') ->setCellValue('I1', 'City') ->setCellValue('J1', 'State') ->setCellValue('K1', 'Pincode') ->setCellValue('L1', 'Specify Other Pincode') ->setCellValue('M1', 'Reason for change in PD visit address') ->setCellValue('N1', 'Address Type') ->setCellValue('O1', 'Specify Other Address Type') ->setCellValue('P1', 'Locality') ->setCellValue('Q1', 'Specify Other Locality') ->setCellValue('R1', 'Approach to PD Location') ->setCellValue('S1', 'Comment on locality') ->setCellValue('T1', 'Estimated Area') ->setCellValue('U1', 'Unit Of Measurement') ->setCellValue('V1', 'Specify Other UOM') ->setCellValue('W1', 'Remarks'); $sheet->getActiveSheet()->setTitle('Address Details'); break; case 6: ## '6', 'Family Details' $sheet->createSheet(); $sheet->setActiveSheetIndex($i)->setCellValue('A1', 'Client Details !'); $sheet->getActiveSheet()->setTitle('Family Details'); break; case 7: ## '7', 'Banking Details' $sheet->createSheet(); $sheet->setActiveSheetIndex($i)->setCellValue('A1', 'Client Details !'); $sheet->getActiveSheet()->setTitle('Banking Details'); break; case 8: ## '8', 'Existing Loan Obligations' $sheet->createSheet(); $sheet->setActiveSheetIndex($i)->setCellValue('A1', 'Client Details !'); $sheet->getActiveSheet()->setTitle('Existing Loan Obligations'); break; case 9: ## '9', 'Other Income Details' $sheet->createSheet(); $sheet->setActiveSheetIndex($i)->setCellValue('A1', 'Client Details !'); $sheet->getActiveSheet()->setTitle('Other Income Details'); break; case 10: ## '10', 'Loan Details' $sheet->createSheet(); $sheet->setActiveSheetIndex($i) ->mergeCells('A1:A2')->setCellValue('A1', 'PDID') ->mergeCells('B1:B2')->setCellValue('B1', 'Loan Amount Applied for ?') ->mergeCells('C1:C2')->setCellValue('C1', 'Loan Tenure applied for ?') ->mergeCells('D1:D2')->setCellValue('D1', 'Sub-Product') ->mergeCells('E1:E2')->setCellValue('E1', 'What is the End Use') ->mergeCells('F1:F2')->setCellValue('F1', 'Specify End Use') ->mergeCells('G1:G2')->setCellValue('G1', 'Is there a balance transfer ?') ->mergeCells('H1:H2')->setCellValue('H1', 'Amount of Own Contribution') ->mergeCells('I1:I2')->setCellValue('I1', 'Source of Own Contribution') ->mergeCells('J1:J2')->setCellValue('J1', 'Specify Other Sources') ->mergeCells('K1:K2')->setCellValue('K1', 'What is the amount for Balance Transfer ?') ->mergeCells('L1:L2')->setCellValue('L1', 'Lender from where balance transfer done') ->mergeCells('M1:M2')->setCellValue('M1', 'Specify other Lender') ->mergeCells('N1:N2')->setCellValue('N1', 'Topup Amount ') ->mergeCells('O1:O2')->setCellValue('O1', 'What is the End Use of the Top Up ?') ->mergeCells('P1:P2')->setCellValue('P1', 'Specify End Use Of TopUP') ->mergeCells('Q1:Q2')->setCellValue('Q1', 'EMI Amount Comfortable Paying') ->mergeCells('R1:AB1')->setCellValue('R1', 'Details of Property being Mortgaged') ->setCellValue('R2', 'Type of property') ->setCellValue('S2', 'Specify type of property') ->setCellValue('T2', 'Name of the proposed owner') ->setCellValue('U2', 'Status of Construction') ->setCellValue('V2', 'Estimate Market Value as Per Customer') ->setCellValue('W2', 'Name of current owner(s)/ Seller(s) of the property') ->setCellValue('X2', 'Address of the proposed property') ->setCellValue('Y2', 'State') ->setCellValue('Z2', 'City') ->setCellValue('AA2', 'Pincode') ->setCellValue('AB2', 'Specify Other pincode') ->mergeCells('AC1:AC2')->setCellValue('AC1', 'Remarks') ->mergeCells('AD1:AD2')->setCellValue('AD1', 'Facility Amount Applied For ?') ->mergeCells('AE1:AE2')->setCellValue('AE1', 'Name of the Anchor') ->mergeCells('AF1:AI1')->setCellValue('AF1', 'applicant`s association vintage with the Anchor') ->mergeCells('AJ1:AU1')->setCellValue('AJ1', 'Credit period with the Anchor (Days)') ->setCellValue('AF2', 'Year') ->setCellValue('AG2', 'Month') ->setCellValue('AH2', 'Monthly business (sale/purchase) with the Anchor') ->setCellValue('AI2', 'Business concentration with Anchor %') ->setCellValue('AJ2', 'Number of days') ->setCellValue('AK2', 'Payment Mechanism') ->setCellValue('AL2', 'Average Invoice Value') ->setCellValue('AM2', 'Are there peak seasons for the business with Anchor') ->setCellValue('AN2', 'Months in which sales/service is low?') ->setCellValue('AO2', 'Comments') ->setCellValue('AP2', 'Are there debit/credit notes being issued to/by Anchor') ->setCellValue('AQ2', 'Reason for such debit/credit notes') ->setCellValue('AR2', 'Value of stock related to Anchor') ->setCellValue('AS2', 'Observations on Sample Invoices') ->setCellValue('AT2', 'reason for no sample invoices') ->setCellValue('AU2', 'Details of invoice and lorry recipts like date, amount, Quantity, Vehicle number, Client and supplier name'); $sheet->getActiveSheet()->setTitle('Loan Details'); break; case 11: ## '11', 'Stock Details' $sheet->createSheet(); $sheet->setActiveSheetIndex($i)->setCellValue('A1', 'Client Details !'); $sheet->getActiveSheet()->setTitle('Stock Details'); break; case 12: ## '12', 'Employment Information' $sheet->createSheet(); $sheet->setActiveSheetIndex($i)->setCellValue('A1', 'Client Details !'); $sheet->getActiveSheet()->setTitle('Employment Information'); break; case 13: ## '13', 'Business Information' $sheet->createSheet(); $sheet->setActiveSheetIndex($i)->setCellValue('A1', 'Client Details !'); $sheet->getActiveSheet()->setTitle('Business Information'); break; case 14: ## '14', 'Financial Information' $sheet->createSheet(); $sheet->setActiveSheetIndex($i)->setCellValue('A1', 'Client Details !'); $sheet->getActiveSheet()->setTitle('Financial Information'); break; case 15: ## '15', 'Lender Representative' $sheet->createSheet(); $sheet->setActiveSheetIndex($i)->setCellValue('A1', 'Client Details !'); $sheet->getActiveSheet()->setTitle('Lender Representative'); break; case 16: ## '16', 'Assessed Income' $sheet->createSheet(); $sheet->setActiveSheetIndex($i)->setCellValue('A1', 'Client Details !'); $sheet->getActiveSheet()->setTitle('Assessed Income'); break; case 17: ## '17', 'Rental Verification' $sheet->createSheet(); $sheet->setActiveSheetIndex($i)->setCellValue('A1', 'Client Details !'); $sheet->getActiveSheet()->setTitle('Rental Verification'); break; case 18: ## '18', 'General Information' $sheet->createSheet(); $sheet->setActiveSheetIndex($i) ->mergeCells('A1:A2')->setCellValue('A1', 'PDID') ->mergeCells('B1:G1')->setCellValue('B1', 'Name of Person(s) Met and Individual Loan Applicant(s)') ->mergeCells('H1:H2')->setCellValue('H1', 'Is the applicant name same as per KYC') ->mergeCells('I1:I2')->setCellValue('I1', 'Capture the correct name as per the KYC?') ->mergeCells('J1:O1')->setCellValue('J1', 'Company') ->mergeCells('P1:R1')->setCellValue('P1', 'Relationship Between Individuals') ->mergeCells('S1:U1')->setCellValue('S1', 'Relationship of Individuals to Company / Firm') ->mergeCells('V1:V2')->setCellValue('V1', 'Remarks') ->setCellValue('B2', 'Name')->setCellValue('C2', 'Person Contacted')->setCellValue('D2', 'Is Loan applicant') ->setCellValue('E2', 'Age')->setCellValue('F2', 'Qualification')->setCellValue('G2', 'Specify Qualification') ->setCellValue('J2', 'Company/Firm')->setCellValue('K2', 'Is applicant')->setCellValue('L2', 'Company/Firm Entity Type') ->setCellValue('M2', 'Month (Number of Years For Which The Company/Firm Has Been Running)') ->setCellValue('N2', 'Year (Number of Years For Which The Company/Firm Has Been Running)') ->setCellValue('O2', 'Date of Formation (Number of Years For Which The Company/Firm Has Been Running)') ->setCellValue('P2', 'Name')->setCellValue('Q2', 'Relation')->setCellValue('R2', 'Relationship To') ->setCellValue('S2', 'Applicant')->setCellValue('T2', 'Relation')->setCellValue('U2', 'Company') ->setTitle('General Information'); // $conditional1 = new \PhpOffice\PhpSpreadsheet\Style\Conditional(); // $conditional1->setConditionType(\PhpOffice\PhpSpreadsheet\Style\Conditional::CONDITION_CELLIS); // $conditional1->setOperatorType(\PhpOffice\PhpSpreadsheet\Style\Conditional::OPERATOR_LESSTHAN); // $conditional1->addCondition('0'); // $conditional1->getStyle()->getFont()->getColor()->setARGB(\PhpOffice\PhpSpreadsheet\Style\Color::COLOR_RED); // $conditional1->getStyle()->getFont()->setBold(true); // $conditional2 = new \PhpOffice\PhpSpreadsheet\Style\Conditional(); // $conditional2->setConditionType(\PhpOffice\PhpSpreadsheet\Style\Conditional::CONDITION_CELLIS); // $conditional2->setOperatorType(\PhpOffice\PhpSpreadsheet\Style\Conditional::OPERATOR_GREATERTHANOREQUAL); // $conditional2->addCondition('0'); // $conditional2->getStyle()->getFont()->getColor()->setARGB(\PhpOffice\PhpSpreadsheet\Style\Color::COLOR_GREEN); // $conditional2->getStyle()->getFont()->setBold(true); // $conditionalStyles = $sheet->getActiveSheet()->getStyle('B2')->getConditionalStyles(); // $conditionalStyles[] = $conditional1; // $conditionalStyles[] = $conditional2; // $sheet->getActiveSheet()->getStyle('B2')->setConditionalStyles($conditionalStyles); break; case 19: ## '19', 'Neighbourhood / Reference Check' $sheet->createSheet(); $sheet->setActiveSheetIndex($i)->setCellValue('A1', 'Client Details !'); $sheet->getActiveSheet()->setTitle('Neighbourhood and Ref Check'); break; case 20: ## '20', 'Final Remarks Form' $sheet->createSheet(); $sheet->setActiveSheetIndex($i)->setCellValue('A1', 'Client Details !'); $sheet->getActiveSheet()->setTitle('Final Remarks Form'); break; case 21: ## '21', 'Business Banking' $sheet->createSheet(); $sheet->setActiveSheetIndex($i)->setCellValue('A1', 'Client Details !'); $sheet->getActiveSheet()->setTitle('Business Banking'); break; case 22: ## '22', 'Business Assets' $sheet->createSheet(); $sheet->setActiveSheetIndex($i)->setCellValue('A1', 'Client Details !'); $sheet->getActiveSheet()->setTitle('Business Assets'); break; case 23: ## '23', 'Future Plan and Business Environment' $sheet->createSheet(); $sheet->setActiveSheetIndex($i)->setCellValue('A1', 'Client Details !'); $sheet->getActiveSheet()->setTitle('Future Plan'); break; case 24: ## '24', 'Credit Manager Queries' $sheet->createSheet(); $sheet->setActiveSheetIndex($i)->setCellValue('A1', 'Client Details !'); $sheet->getActiveSheet()->setTitle('Credit Manager Queries'); break; case 25: ## '25', 'Vendor PD Form' $sheet->createSheet(); $sheet->setActiveSheetIndex($i)->setCellValue('A1', 'Client Details !'); $sheet->getActiveSheet()->setTitle('Vendor PD Form'); break; case 26: ## '26', 'Photograph' $sheet->createSheet(); $sheet->setActiveSheetIndex($i)->setCellValue('A1', 'Client Details !'); $sheet->getActiveSheet()->setTitle('Photograph'); break; default: ## echo "Final - No Form ID";break; }// Switch ends here // $spreadsheet->setActiveSheetIndex(0) // ->setCellValue('A'.$i, ) // ->setCellValue('B'.$i, ) // ->setCellValue('C'.$i, ) // ->setCellValue('D'.$i, ); $i++; } return $sheet; } ## '1', 'Supplier Details' static function gatheringSupplierForm($processedJson){ }// supplier ends here ## '2', 'Client Details' static function gatheringClientForm($processedJson){ } //client ends here ## '3', 'Personal Details' static function gatheringPersonalForm($processedJson){ }//personal ends here ## '4', 'Other Assets' static function gatheringOtherAssetForm($processedJson){ }// other asset ends here ## '5', 'Address Details' static function gatheringAddressForm($processedJson){ }//address ends here ## '6', 'Family Details' static function gatheringOtherFamilyDetailsForm($processedJson){ }// family ends here ## '7', 'Banking Details' static function gatheringBankingInfoForm($processedJson){}// banking ends here ## '8', 'Existing Loan Obligations' static function gatheringExistingLoanDetailsForm($processedJson){} //exist loan ends here ## '9', 'Other Income Details' static function gatheringOtherIncomeDetailsForm($processedJson){}// other Income ends here ## '10', 'Loan Details' static function gatheringLoanDetailsForm($processedJson){}// loan ends here ## '11', 'Stock Details' static function gatheringStockDetailsForm($processedJson){}// stock ends here ## '12', 'Employment Information' static function gatheringEmploymetForm($processedJson){}// employment INfoo ends here ## '13', 'Business Information' static function gatheringBusinessForm($processedJson){ }// buiness ends here ## '14', 'Financial Information' static function gatheringFinancialInfoForm($processedJson){ }//financial ends here ## '15', 'Lender Representative' static function gatheringLenderRepresentativeForm($processedJson){}//lender rep ends here ## '16', 'Assessed Income' static function gatheringAssessedIncomeForm($processedJson){ }// assess info ends here ## '17', 'Rental Verification' static function gatheringRentalIncomeForm($processedJson){ } //rental info ends here ## '18', 'General Information' static function gatheringGeneralInfoForm($processedJson){ }//general ends here ## '19', 'Neighbourhood / Reference Check' static function gatheringNeighbourForm($processedJson){ }// refer ends here ## '20', 'Final Remarks Form' static function gatheringFinalRemarksForm($processedJson){ }// final remarks ends here ## '21', 'Business Banking' static function gatheringBusinessBankingForm($processedJson){ }// buiness bank ends here ## '22', 'Business Assets' static function gatheringBusinessAssetsForm($processedJson){} //buiness asset ends here ## '23', 'Future Plan and Business Environment' static function gatheringFuturePlanandBusinessEnvironmentForm($processedJson){}//future plan ends here ## '24', 'Credit Manager Queries' static function gatheringCreditManagerQueriesForm($processedJson){}// CM quries ends here ## '25', 'Vendor PD Form' static function gatheringVendorPDForm($processedJson){} // pd vendor info ends here ## '26', 'Photograph' static function gatheringPhotographForm($processedJson){} //photograph ends here } ?>