Solved

Reading from an Excel file

Posted on 2002-06-19
5
195 Views
Last Modified: 2011-09-20
hi folks
I have aproblem in reading and updating the  cell contents of an excel file through PHP.
Can you please help me ASAP.
Thanks in advance.
0
Comment
Question by:empriya
  • 2
5 Comments
 
LVL 40

Expert Comment

by:RQuadling
ID: 7092235
What method are you using? ODBC or COM?
0
 
LVL 40

Accepted Solution

by:
RQuadling earned 70 total points
ID: 7092252
If you are using ODBC, then make sure you add a $ to the end of the sheet name.

So,

"SELECT * from [Sheet1$]"

would be a valid query string.

A few things to be aware of :

1 - Column headings are required otherwise you will get your first row of data as column names.
2 - Column headings cannot be blank!

You can also set a name to some cells that you want to access via ODBC.

Select the required cells.

Choose Insert->Name->Define and give it a name, say "Testing"

You can then you ...

"SELCT * FROM Testing".

Regards,

Richard Quadling.
0
 
LVL 11

Expert Comment

by:shmert
ID: 9643489
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept: rquadling
Please leave any comments here within the next seven days.
               
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
               
Sam Barnum
EE Cleanup Volunteer              
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now