Тёмный
No video :(

Create and read Excel sheets with styles and dynamic data - PHP & MySQL 

Adnan Afzal
Подписаться 8 тыс.
Просмотров 2,7 тыс.
50% 1

Create and read Excel sheets with styles and dynamic data - PHP & MySQL
To create a new Excel sheet or read an existing one, you will need a library called PHPSpreadSheet. PhpSpreadsheet is a library written in pure PHP and providing a set of classes that allow you to read from and to write to different spreadsheet file formats, like Excel and LibreOffice Calc. It requires a PHP version of at least 7.1 or above. You can install this library using Composer, which is an application-level package manager for PHP that provides a standard format for managing dependencies of PHP libraries. You can install it easily in your localhost, and in live server or hosting, you will need SSH access to that server. It is different for some hosting providers so if you are having difficulty in connecting with SSH you can mention your problem in the comments section of this video.
Key Points:
- Creating an Excel sheet using PHP
- Reading Excel sheet in PHP
- Apply styles to cells
Download Composer:
getcomposer.org
Source code:
adnan-tech.com...

Опубликовано:

 

22 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 22   
@mouradmessaoud7440
@mouradmessaoud7440 3 года назад
hi everyone it works by removing the special characters from my display
@vivektyagi7492
@vivektyagi7492 3 года назад
$nameproperties=$spreadsheet->getActiveSheet() ->getStyle($nameletter); $B4colour=$spreadsheet->getSheet(1)->getStyle('B4')->getFill()->getStartColor()->getARGB();
@vivektyagi7492
@vivektyagi7492 3 года назад
$B4colour=$spreadsheet->getSheet(1)->getStyle('B4')->getFill()->getStartColor()->getARGB();
@vivektyagi7492
@vivektyagi7492 3 года назад
can you guide me fetching cell colour using spreadsheet
@MuhammadTalha-qn3hc
@MuhammadTalha-qn3hc Год назад
hello brother I have dynamic data by dynamic i mean that some values are coming from db and based on that db values i'm doing some cacl and set those values to table and then I am sending that table on form submit and then export occurs. the problem is that i am not styling the data can i asked for some suggestions ?
@AdnanAfzal565
@AdnanAfzal565 Год назад
What error you are having ?
@MuhammadTalha-qn3hc
@MuhammadTalha-qn3hc Год назад
@@AdnanAfzal565 Sir i don't have any error but the issue is that I am storing 3 tables data in one single variable as a string(becomes a static data) and after that i pass that string to a controller now in controller i dont know how to style that one string data(adding borders, giving background colors to specific cells) because data is dynamic(can be small or large) and then export to excel.
@vivektyagi7492
@vivektyagi7492 3 года назад
$reader->setReadDataOnly(false);
@suyogvlogger5240
@suyogvlogger5240 3 года назад
Brother can you tell me that ,Suppose excell data sheet is alredy created but how I can fetch range value of 3.5 and 8.5 numbers
@AdnanAfzal565
@AdnanAfzal565 3 года назад
Yes, you can do that using the following line: $objPHPExcel->setActiveSheetIndex(0)->rangeToArray('A1:C3'); where you can specify the range of your data cells.
@suyogvlogger5240
@suyogvlogger5240 3 года назад
@@AdnanAfzal565 brother I am making milk Collection website to jab apn fat or snf ki value dalte hain to rate aata hain
@vivektyagi7492
@vivektyagi7492 3 года назад
using this line but it always return same colour
@AdnanAfzal565
@AdnanAfzal565 3 года назад
What function you are using to get cell color ?
@vivektyagi7492
@vivektyagi7492 3 года назад
@@AdnanAfzal565 resolved now thanks
@AdnanAfzal565
@AdnanAfzal565 3 года назад
@@vivektyagi7492 You are welcome.
@vivektyagi7492
@vivektyagi7492 3 года назад
please help
@mouradmessaoud7440
@mouradmessaoud7440 3 года назад
salut, i can't display data, i create an empty Excel sheet ?
@AdnanAfzal565
@AdnanAfzal565 3 года назад
What error are you seeing ?
@mouradmessaoud7440
@mouradmessaoud7440 3 года назад
great thanks , the php does not display any error and the xlsx file is generated but empty, I tried to export data from my phpmyadmin database
@AdnanAfzal565
@AdnanAfzal565 3 года назад
Make sure the number of columns are same. Also make sure you are escaping html entities like: htmlentities() function.
@mouradmessaoud7440
@mouradmessaoud7440 3 года назад
@@AdnanAfzal565 hello, I want to thank you once again it was an encoding problem because my data is in french there are the specials characters like ' é à
@AdnanAfzal565
@AdnanAfzal565 3 года назад
Okay, great.
Далее
PDF view in browser and export as file - PHP
17:40
Просмотров 12 тыс.
Read any Excel File using PHPExcel in PHP
11:44
Просмотров 41 тыс.
💀СЛОМАЛ Айфон за 5 СЕКУНД😱
00:26
Interactive Excel Dashboards & ONE CLICK Update!
52:26
3 Essential Excel skills for the data analyst
18:02
Просмотров 1,5 млн
💀СЛОМАЛ Айфон за 5 СЕКУНД😱
00:26