Tag: php

Upload via SFTP using Excel VBA code

I have tried to use the following code, which I found in a previous SO question, to upload a generated .php file to my shared server via FTP. I am using Excel 2016 on Windows 10, and trying to upload to a server with 1and1. Public Sub FtpSend() Dim vPath As String Dim vFile As […]

How to read XLS file & convert it to CSV format

I have below data in my XLS file’s 1st Column <table border=”1″> <tr> <th align=”left”>First Name</th> <th align=”left”>Gender</th> <th align=”left”>Nationality</th> </tr> <tr> <td align=”left”>Mike</td> <td align=”left”>M</td> <td align=”left”>Singaporean</td> </tr> I would like to convert it to CSV file so output should be in CSV file First Name Gender Nationality Mike M Singaporean I alerady seen […]

How to insert value with same id in one cell in PHPExcell

I have an excell file generated from php request. SO what i have inside excel file is: username, project, process. Here is first table username: uid| username| salary| —+———+——-+ 1 | bob | 0 | 2 | barikan | 0 | 3 | beny | 0 | Second table process: projectNo| process | proc_leader| ———+———+————+ […]

Alternative for PHP_excel

Is there any alternative for PHP_excel which can “Export to XLSX/XLS” file in a customized format? This is a General Reference question for the php tag

excel file not downloading in proper format in php

I have use following code for download excel file. $filename = “property.xls”; // File Name // Download file header(“Content-Disposition: attachment; filename=\”$filename\””); header(“Content-Type: application/vnd.ms-excel”); But, it will download blank excel file i need to download content of <table> tag. I have place this code at top of page and during reloading of my page it will […]

PHP and MYSQL: Convert 25 character long string to number

I am working on a project, were I need to store a 25 digit number. When I tried to use BIGINT data format, it shows out of range. Then I stored it using VARCHAR data type. But I also need to export this into an MS-EXCEL sheet. When I export it, Excel show only 13-14 […]

PHPExcel creates an empty column

I open an existing file with PHPExcel::IOFactory, like so: $excel = \PHPExcel_IOFactory::createReader(‘Excel2007’)->load(‘Sample.xlsx’); Then I add some data in the already populated columns, where the placeholders reside. I don’t enter any data in the newly column that is automatically created. I only write to two columns, D and H, like so: $excel->getActiveSheet()->setCellValueByColumnAndRow($column, $row, $value); Then, I […]

phpexcel get value if cell.index equals date.now

I have a excel file with shedule. It’s look like this: I’m need to get cell value of current day as: john 8 I’m find to example, how to display xls file: $dateD = date(‘d’); include ‘Classes/PHPExcel/IOFactory.php’; $objPHPExcel = PHPExcel_IOFactory::load(“files.xls”); $objPHPExcel->setActiveSheetIndex(0); $aSheet = $objPHPExcel->getActiveSheet(); foreach($aSheet->getRowIterator() as $row){ $cellIterator = $row->getCellIterator(); foreach($cellIterator as $cell){ if ($cell->getCalculatedValue() […]

PHP: Compare two csv files and remove duplicates

I have a one column csv file of email addresses called email addresses: master_list.csv I wish to compare the above file against a second csv file: emails_to_remove.csv With the end result being to remove matched emails and export a clean / scrubbed list to a third file called: master_list_scrubbed.csv I found a similar question / […]

PHPExcel Truncate zero from begin and change dot in comma

I have to create this excel with the A column setted as TEXT. In this column there will be some code product like: 0301.001.010 0301.006 the problem is that in the excel i get: 0301.001.010 ——> Ok (_dataType = ‘s’) 301,006 ——-> no,(_dataType = ‘n’) the dot became a comma and there’s not anymore the […]

MS Excel Spreadsheet is the best Office Software, Excel VBA and Excel Formulas make Spreadsheet work faster.