Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Reading from an Excel file

Posted on 2002-06-19
5
Medium Priority
?
239 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 280 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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.
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.
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 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…

721 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