Solved

Reading from an Excel file

Posted on 2002-06-19
5
236 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 40

Expert Comment

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

Accepted Solution

by:
Richard Quadling 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
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 …

622 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