laravel-4.2


how to count column(with data) number in laravel excel maatwebsite


if(Input::hasFile('excel_file')){
$path = Input::file('excel_file')->getRealPath();
$data = Excel::load($path, function($reader) {
$reader->setDateFormat('Y-m-d');
})->get();
$objPHPExcel = new PHPExcel();
$highestColumn = $objPHPExcel->setActiveSheetIndex(0)->getHighestColumn();
$highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn);
echo $highestColumnIndex;
exit();
}
I can import excel file and count the rows are there by using $data->count(). But i can't figure out column numbers. How can i get how many columns are in the rows?i tried with phpexcel too but failed.need the solution badly.
$path = Input::file('excel_file')->getRealPath();
$data = Excel::load($path, function($reader) {
$reader->setDateFormat('Y-m-d');
$objExcel = $reader->getExcel();
$sheet = $objExcel->getSheet(0);
$highestColumn = $sheet->getHighestColumn();
$highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn);
Session::put('val',$highestColumnIndex);
})->get();
Problem Solved

Related Links

Itunes api call limit
how to solve update part error in laravel 4.2
How to delete a directory with its file from the public storage in laravel 4.2
Laravel 4.2 site doesn't work on localhost
send value from views in form of {{ FORM:: }} and recieve value in controller
how to count column(with data) number in laravel excel maatwebsite
Where to write common function or logic in laravel 4.2
post ajax jquery laravel 4 error 500
Undefine variable via post method in sending email from array using laravel 4.2
IronQueue sending jobs twice
Upload Log files to different server : Laravel
Url loading the login page again after login in Laravel4

Categories

HOME
knockout.js
libgdx
svn
generics
xcode
yahoo-weather-api
dotnetnuke
couchdb
windows-10
biztalk
jersey-2.0
tfs2015
haxe
native-base
swarm
spring-security-oauth2
yeoman-generator-angular
nexus3
rangy
clish
mailmerge
cuba-platform
l20n
exec-maven-plugin
salt-cloud
kamailio
quantitative-finance
ini
ava
beego
sap-lumira
marquee
laravel-4.2
publishing
argv
series
private-key
om-next
buildforge
resampling
get-event-store
data-uri
transparency
type-inference
openstack-glance
entropy
embedded-v8
dtd
d3v4
email-injection
bpms
cefpython
jsonix
ajaxmin
uibinder
apache-commons-digester
calcite
supersocket.net
green-threads
cache-manifest
tree-structure
quercus
gflags
html-escape-characters
device-admin
inequality
angular-ui-select
osascript
webmethod
san
ax
aero
ofstream
semantic-merge
xcode4.5
flymake
net-use
rtd
airprint
bll
resharper-5.1
icicles
google-translator-toolkit
spring-modules
subtext
word-automation

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App