Solved

Reading from an Excel file

Posted on 2002-06-19
5
232 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PHP substring 3 54
How do I allow for non standard CSV file 9 47
Can't Find the Homepage on my site 4 47
integrated two Separate file . 3 30
Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

752 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