Wednesday, June 20, 2007
Create Word Document Using PHP
//1. create the MS Word Object.s
$word = new COM("word.application") or die("Unable to instantiate Word");
//2. specify the MS Word template document (with Bookmark {firstname} inside)
$template_file = "template1.dot";
//3. open the template document
$word->Documents->Open($template_file);
//4. get the username from database.
$user_name = "Jignesh";
//5. get the bookmark and create a new MS Word Range (to enable text substitution)
$bookmarkname = "firstname";
$objBookmark = $word->ActiveDocument->Bookmarks($bookmarkname);
$range = $objBookmark->Range;
//6. now substitute the bookmark with actual value
$range->Text = $user_name;
//7. Write Image to word file.
$word->ActiveDocument->Shapes->AddPicture("logo.gif",TRUE,TRUE,100,100);
//8. save the template as a new document (c:/reminder_new.doc)
$new_file = "name2.doc";
$word->Documents[1]->SaveAs($new_file);
//9. free the object
$word->Quit();
$word = null;
echo "File Successfully Created.";
/* Check Bookmark available or not in the document.
if($word->ActiveDocument->Bookmarks->Exists($bookmarkname))
{
//then create a Range and perform the substitution
$objBookmark = $word->ActiveDocument->Bookmarks($bookmarkname);
$range = $objBookmark->Range;
//now substitute the bookmark with actual value
$range->Text = $current_date;
}
*/
?>
Monday, June 18, 2007
Generate PDFs with PHP
In order to use PHP's PDF manipulation capabilities, you need to have the PDFLib library installed on your system. If you're working on Linux, you can download a copy from http://www.pdflib.com/pdflib/index.html and compile it for your box. If you're running Windows, your job is even simpler - a pre-built PDF library is bundled with your distribution, and all you need to do is activate it by uncommenting the appropriate lines in your PHP configuration file.
Additionally, you'll need a copy of the (free!) Adobe Acrobat PDF reader, so that you can view the documents created via the PDFLib library. You can download a copy of this reader from http://www.adobe.com/
Once you've got everything in place, it's time to create a simple PDF file. Here goes:
// create handle for new PDF document
$pdf = pdf_new();
// open a file
pdf_open_file($pdf, "philosophy.pdf");
// start a new page (A4)
pdf_begin_page($pdf, 595, 842);
// get and use a font object
$arial = pdf_findfont($pdf, "Arial", "host", 1); pdf_setfont($pdf, $arial, 10);
// print text
pdf_show_xy($pdf, "There are more things in heaven and earth, Horatio,", 50, 750); pdf_show_xy($pdf, "than are dreamt of in your philosophy", 50, 730);
// end page
pdf_end_page($pdf);
// close and save file
pdf_close($pdf);
?>
Save this file, and then browse to it through your Web browser. PHP will execute the script, and a new PDF file will be created and stored in the location specified at the top of the script. Here's what you'll see when you open the file:
Anatomy Lesson
Let's take a closer look at the code used in the example above.
Creating a PDF file in PHP involves four basic steps: creating a handle for the document; registering fonts and colours for the document; writing or drawing to the handle with various pre-defined functions; and saving the final document.
Let's take the first step - creating a handle for the PDF document.
// create handle for new PDF document
$pdf = pdf_new();
This is accomplished via the pdf_new()
function, which returns a handle to the document. This handle is then used in all subsequent operations involving the PDF document.
Next up, you need to give the PDF file a name - this is accomplished via the pdf_open_file()
function, which requires the handle returned in the previous operation, together with a user-defined file name.
// open a file
pdf_open_file($pdf, "philosophy.pdf");
Once a document has been created, you can insert new pages in it with thepdf_begin_page()
function,
// start a new page (A4)
pdf_begin_page($pdf, 595, 842);
and end pages with the - you guessed it! - pdf_end_page()
function.
// end page
pdf_end_page($pdf);
Note that the pdf_begin_page()
function requires two additional parameters, which represent the width and height of the page to be created in points (a point is 1/72 of an inch). In case math isn't your strong suit, the PHP manual provides width and height measurements for most standard page sizes, including A4, the one used in the example above.
In between the calls to pdf_begin_page()
and pdf_end_page()
comes the code that actually writes something to the PDF document, be it text, images or geometric shapes. In this case, all I'm doing is writing a line of text to the document - so all I need to do is pick a font, and then use that font to write the text string I need to the document.
Selecting and registering a font is accomplished via the pdf_findfont()
and pdf_setfont()
functions. The pdf_findfont()
function prepares a font for use within the document, and requires the name of the font, the encoding to be used, and a Boolean value indicating whether or not the font should be embedded in the PDF file; it returns a font object, which may be used via a call to pdf_setfont()
.
$arial = pdf_findfont($pdf, "Arial", "host", 1); pdf_setfont($pdf, $arial, 10);
Once the font has been set, the pdf_show_xy()
function can be used to write a text string to a particular position on the page.
// print text
pdf_show_xy($pdf, "There are more things in heaven and earth, Horatio,", 50, 750); pdf_show_xy($pdf, "than are dreamt of in your philosophy", 50, 730);
As you can see, this function requires a handle to the PDF document, a reference to the font object to be used, the text string to be written (obviously!), and the X and Y coordinates of the position at which to begin writing the text. These coordinates are specified with respect to the origin (0,0), which is located at the bottom left corner of the document.
Once the text has been written, the page is closed via a call to pdf_end_page()
. You can then add one or more extra pages, or - as I've done here - simply close the document via pdf_close()
. This will save the document contents to the file specified in the initial call to pdf_open_file()
, and destroy the document handle created.
Saturday, June 16, 2007
PHP books collection
Note:
links are tested only on mozila firefox. so please first download
mozila firefox brower to view full link. you can get it from right top
corner of this site. Internet explorer may cut some part of links.
Copy and paste the links in address bar and change 'hxxp' to 'http' and press enter:
index of parent directory
O'Reilly - Essential PHP.Security (October 2005).chm 369k Compiled HTML eBook
O'Reilly - PHP Cookbook.chm 1.2M Compiled HTML eBook
O'Reilly - PHP in a Nutshell (October 2005).chm 1.1M Compiled HTML eBook
O'Reilly - Programming PHP.chm 1.5M Compiled HTML eBook
hxxp://www.discordiaphile.com/books/PHP/
index of parent directory
(EN) Sams Teach Yourself PHP, MySQL and Apache All in One.chm 01-Jun-2005 15:06 4.2M
(eBook) - Professional PHP Programming.pdf 01-Jun-2005 15:08 18M
(ebook) Building PHP Applications With Macromedia Dreamweaver MX.pdf 01-Jun-2005 15:01 371K
(ebook) O'Reilly - PHP Cookbook.PDF 01-Jun-2005 15:03 2.6M
MySQL-PHP.pdf 01-Jun-2005 15:10 3.5M
PHP and MySQL - MySQL Bible.pdf 01-Jun-2005 15:15 6.3M
PHP and MySQL Web Dev.pdf 01-Jun-2005 15:15 7.1M
Sams.Teach.Yourself.PHP.MySQL.And.Apache.In.24Hours.eBook-LiB.chm 01-Jun-2005 15:17 3.3M
Wiley,.PHP.5.for.Dummies.(2004).DDU;.BM.OCR.6.0.ShareConnector.pdf 01-Jun-2005 15:18 5.9M
building a database-driven website using php and mysql.pdf 01-Jun-2005 15:06 342K
eBook_Web_Application_Development_With_PHP_4.0_ShareReactor.pdf 01-Jun-2005 15:10 6.3M
hxxp://www.csxix.com/ebook/PHP eBook/
index of parent directory
(ebook - pdf) - web application design with php4.pdf 19-Oct-2006 07:35 6.3M
(ebook-pdf) oreilly - programming php.pdf 19-Oct-2006 07:38 6.8M
sams teach yourself php 4 in 24 hours.pdf 19-Oct-2006 07:32 2.5M
hxxp://phattymatty.net/media/software/PHP/
John.Wiley.and.Sons.PHP.and.MySQL.for.Dummies.Second.Edition.Mar.2004.eBook-DDU.pdf 11-Mar-2005 17:04 9.5M
hxxp://www.astral.ro/~cata/carte/
index of parent direcotry
(ebook - CHM) Sams - Teach Yourself PHP MySQL and Apache in 24 Hours - 2003.chm 2 3.3 MB 2006-Aug-14
(ebook pdf) MySQL-PHP.pdf 11 3.5 MB 2006-Aug-14
Beginning PHP, Apache, MySQL Web Development.pdf 0 12.4 MB 2006-Aug-14
Dynamic Site with PHP_MySQL.pdf 7 611.9 KB 2006-Aug-14
mysql-php database applications.pdf 3 3.5 MB 2006-Aug-14
PHP & MySQL For Dummies®, 2nd Edition.pdf 5 9.5 MB 2006-Aug-14
php-mysql tutorial.pdf 0 196.7 KB 2006-Aug-14
PHP - SAMS - PHP and MySQL Web Development.pdf 0 7.0 MB 2006-Aug-14
PHP 5 and MySQL Bible.pdf 5 16.0 MB 2006-Aug-14
PHP and MySQL for Dummies - Second Edition.pdf 5 9.5 MB 2006-Aug-14
PHP and MySQL Web Dev.pdf 4 7.1 MB 2006-Aug-14
php_mysql_tutorial.pdf 0 1.1 MB 2006-Aug-14
Teach.Yourself.PHP.In.24hours.chm 12 2.2 MB 2006-Aug-14
Teach Yourself PHP, MySQL® and Apache All in One, Second Edition.chm 1 9.0 MB 2006-Aug-14
Teach Yourself PHP, MySQL and Apache - All-in-One 2003.chm 1 4.2 MB 2006-Aug-14
Web Database Applications with PHP & MySQL 2002.pdf 0 6.3 MB 2006-Aug-14
Web Database Application with PHP and MySQL, 2nd Edition.chm 1 2.6 MB 2006-Aug-14
Wiley - MySQL and PHP Database Applications, 2nd Ed - 2004.pdf 0 3.9 MB 2006-Aug-14
hxxp://haus-inc.org/DLSectional/index.php?dir=eBooks/PHP-n-MySQL/
PHP & MySQL For Dummies, 2nd Edition.pdf 19-Oct-2006 20:13 9.5M
PHP 5 and MySQL Bible.pdf 19-Oct-2006 19:56 16.0M
PHP.pdf 16-Oct-2006 18:04 18.0M
hxxp://users.telenet.be/1DR8/
hxxp://rapidshare.com/files/5953743/Spring_into_PHP_5_-_Addison_Wesley.chm
hxxp://rapidshare.com/files/5953019/SamPMA24.chm
hxxp://rapidshare.com/files/5952934/Prentice.Hall.PTR.PHP.5.Power.Programming.Oct.2004.eBook-LiB.chm
hxxp://rapidshare.com/files/5952503/Premier_Press_-_PHP_Professional_Projects__868_pages__-_2002.chm
hxxp://rapidshare.com/files/5951950/PHP_5_Recipes_A_Problem_Solution_Approach_-_APress.pdf
hxxp://rapidshare.com/files/5951778/PHP_5_for_Dummies_-_Wiley_2004.pdf
hxxp://rapidshare.com/files/5951553/PHP_5_Fast___Easy_Web_Development.chm
hxxp://rapidshare.com/files/5951222/OReilly.PHP.in.a.Nutshell.Oct.2005.chm
hxxp://rapidshare.com/files/5951171/OReilly.Essential.PHP.Security.Oct.2005.chm
hxxp://rapidshare.com/files/5951155/New_Riders_-_Php_Functions_Essential_Reference.chm
hxxp://rapidshare.com/files/5950946/McGraw-Hill.How.to.Do.Everything.with.PHP.and.MySQL.2005.LinG.pdf
hxxp://rapidshare.com/files/5950639/Advanced_Php_For_Web_Professionals_-_Prentice_Hall.chm
php|architect's Guide to PHP Security
php|architect's Guide to PHP Security|
By Ilia Alshanetsky
* Publisher: Marco Tabini & Associates, Inc.
* Number Of Pages: 200
* Publication Date: 2005-09-05
* Sales Rank: 28027
* ISBN / ASIN: 0973862106
* EAN: 9780973862102
* Binding: Paperback
* Manufacturer: Marco Tabini & Associates, Inc.
* Studio: Marco Tabini & Associates, Inc. Book Description:
With
the number of security flaws and exploits discovered and released every
day constantly on the rise, knowing how to write secure and reliable
applications is become more and more important every day. Written by
Ilia Alshanetsky, one of the foremost experts on PHP security in the
world, php|architect's Guide to PHP Security focuses on providing you
with all the tools and knowledge you need to both secure your existing
applications and writing new systems with security in mind. This book
gives you a step-by-step guide to each security-related topic,
providing you with real-world examples of proper coding practices and
their implementation in PHP in an accurate, concise and complete way.
Provides techniques applicable to any version of PHP, including 4.x and
5.x Includes a step-by-step guide to securing your applications
Includes a comprehensive coverage of security design Teaches you how to
defend yourself from hackers Shows you how to distract hackers with a
"tar pit" to help you fend off potential attacks
SkillSoft Press, Integrating PHP and XML
SkillSoft Press, Integrating PHP and XML
SkillSoft Press | ISBN: N/A | 2004 Year | CHM | 5,8 Mb | Pages: N/A
PHP
is a server-side scripting language used to create Web applications.
XML is a markup language used to exchange data among Web applications.
PHP can be integrated with XML to create Web applications. This book
describes how to use SAX, XSLT, and XPath to manipulate XML documents.
It also describes use of XML-RPC protocol for accessing procedures on a
remote computer. In addition, the book covers WDDX, a technology used
for information exchange between different programming languages.
This
book describes how to create an online shopping cart application that
allows an end user to search for a specific book in a database, place
an order for the book, and purchase the book online.
About the Authors
Amrita
Dubey holds a Bachelor's degree in Electronics and Communication
Engineering. She has worked on various development projects, such as
UNIX shell programming and designing function generator using IC
XR-2206. She is proficient in 8085 microprocessor programming. She also
has knowledge of CNCs, PLCs, circuit designing on PCBs, Software
Quality Testing, RDBMS, SQL Server, and Database Design Studio
Professional 2.21.1. As a technical writer, Amrita has co-authored
books on Digital Electronics, Integrating Java with Oracle9i, PIC
Microcontrollers, Robotics, and Integrating PHP and XML.
Poonam
Sharma holds a Bachelor's degree in Commerce and a DNIIT diploma. In
addition, she is pursuing Master's degree in Computer Applications. She
is proficient in technologies such as Java, C++, VB, ASP, Servlets,
JSP, HTML, UNIX, Linux, and SQL Server 2000. Poonam has worked on
projects such as Online Banking using VB and SQL and Creating Chat
Application in Java. As a technical writer, she has co-authored books
on Working with Korn Shell, Administering Red Hat Linux 9, Basic
Programming in C++, Unix Operating System, and Integrating PHP and XML.
Sreeparna
Dasgupta holds a Master's degree in Computer Science and has earned 'A'
Level certificate from DOEACC. She has worked and trained people on
several technologies, such as Java, C, C++, Visual Basic, Macromedia
Flash MX, Photoshop, Macromedia Director MX, Oracle, SQL Server, Perl,
ASP, and JSP. In addition, Sreeparna has developed online Web
applications using technologies such as ASP.
Vishi Gupta holds a
degree in Electrical Engineering. She is proficient in C, C++, Linux
and PHP. As a technical writer, she has co-authored several books and
articles on varying technologies including PHP, XML, SOAP, Linux, Core
Java, PHPLens, C and C++.
Lalit Kapoor holds a Bachelor's degree
in Computer Engineering. He has completed DNIIT course from NIIT. As a
technical writer, he has authored articles on Java, Oracle, SQL Server,
and PHP.
6084 KB
RAR'd CHM
PHP 5 Advanced: Visual QuickPro Guide
PHP 5 Advanced: Visual QuickPro Guide
By Larry Ullman
* Publisher: Peachpit Press
* Number Of Pages: 608
* Publication Date: 2007-03-05
* Sales Rank: 126794
* ISBN / ASIN: 0321376013
* EAN: 9780321376015
* Binding: Paperback
* Manufacturer: Peachpit Press
* Studio: Peachpit Press Book Description:
PHP
is currently one of the most popular server-side, HTML-embedded
scripting language on the Web. It's specifically designed for Web site
creation and is frequently being used to replace the functionality
created by Perl to write CGI scripts. PHP's popularity and
easier-to-learn appeal has spawned a new breed of programmer, those who
are only familiar with and only use PHP.
Sharpen your PHP skills with the fully revised and updated, PHP 5 Advanced for the World Wide Web: Visual QuickPro Guide! Filled with fifteen chapters of step-by-step content and written by best-selling author and PHP programmer, Larry Ullman,
this guide teaches specific topics in direct, focused segments, shows
how PHP is used in real-world applications, features popular and
most-asked-about scripts, and details those technologies that will be
more important in the future. You'll learn about object-oriented
programming, PHP interactions with a server, XML, RSS, Networking with
PHP, image and PDF generation, and more.
Advanced PHP for Web Professionals
Advanced PHP for Web Professionals
By Christopher Cosentino, Chris Cosentino,
* Publisher: Prentice Hall PTR
* Number Of Pages: 368
* Publication Date: 2002-10-29
* Sales Rank: 589696
* ISBN / ASIN: 0130085391
* EAN: 0076092016236
* Binding: Paperback
* Manufacturer: Prentice Hall PTR
* Studio: Prentice Hall PTR Summary:
From the Back Cover
* Build complex, PHP-driven Web sites—fast!
* Discover powerful new PHP techniques, hands on!
* Learn all-new techniques based on PHP-GTK and PEAR::DB
* Master XML parsing, user authentication, forms processing, data mining, and much more
Take your PHP programming skills to the next level!
In
this concise, hands-on tutorial, PHP expert Christopher Cosentino
delivers dozens of powerful new techniques for building serious Web
applications. Through professional-quality examples drawn from his six
years as a PHP developer, Cosentino walks you through building
friendlier, more usable sites; improving user authentication;
generating dynamic graphics; parsing XML documents; building
database-independent Web applications; and much more!
Take PHP to the limit... and beyond!
* Manage sessions more effectively
* Interact with multiple databases via PEAR::DB
* Improve your form processing scripts
* Parse large files and perform data mining
* Authenticate users by IP address, database query, or HTTP authentication
* Create custom error handlers
* Dump database contents into XML files
* Use PHP-GTK to build client-side cross-platform GUI applications
* And more...
Web Application Development with PHP 4.0
ISBN: 0735709971 July 15, 2000 384 pages PDFPHP is an open-source Web
scripting language that's gaining steam in the development community,
especially in the Apache Web server realm. With a syntax that draws
heavily on C, PHP appeals to advanced programmers who are moving to the
Web from traditional software development.Web Application Development
with PHP 4.0 isn't your run-of-the-mill language tutorial. Authors
Ratschiller and Gerken purposely designed its content to appeal to
coders who already are proficient in PHP, but in need of advanced
programming techniques and high-level application-development skills.
Assuming a strong programming foundation, this book can be considered a
next-level PHP tutorial.
Download Page
PHPUnit Pocket Guide
Publisher: O'Reilly Media, Inc.
Number Of Pages: 88
Publication Date: 2005-09-29
Sales Rank: 118776
ISBN / ASIN: 0596101031
EAN: 9780596101039
Binding: Paperback
Manufacturer: O'Reilly Media, Inc.
Studio: O'Reilly Media, Inc. Book Description:
Smart
web developers will tell you that the sooner you detect your code
mistakes, the quicker you can fix them, and the less the project will
cost in the long run. Well, the most efficient way to detect your
mistakes in PHP is with PHPUnit, an open source framework that
automates unit testing by running a battery of tests as you go. The
benefits of PHPUnit are significant:
a reduction in the effort required to frequently test code
fewer overall defects
added confidence in your code
improved relations with your open source teammates
The
only problem with this popular testing tool was its lack of
documentation-until now, that is. For this, O'Reilly went right to the
source, as Sebastian Bergmann, the author of PHPUnit Pocket Guide, also
happens to be PHPUnit's creator. This little book brings together
hard-to-remember information, syntax, and rules for working with
PHPUnit. It also delivers the insight and sage advice that can only
come from the technology's creator. Coverage of testing under agile
methodologies and Extreme Programming (XP) is also included.
The
latest in O'Reilly's series of handy Pocket Guides, this
quick-reference book puts all the answers are right at your fingertips.
It's an invaluable companion for anyone interested in testing the PHP
code they write for web applications.
Download
PHP by Example
Publisher: Que
Number Of Pages: 450
Publication Date: 2001-11-07
Sales Rank: 1031854
ISBN / ASIN: 0789725681
EAN: 0029236725686
Binding: Paperback
Manufacturer: Que
Book Description:
PHP
By Example will provide web-publishing oriented individuals the
opportunity to learn a new, flexible Internet scripting language, PHP.
This book will take the reader through step-by-step examples that will
help them gain an understanding of PHP. PHP By Example will:
Explain concepts in simple, understandable tasks with multiple approaches to concepts that need clarification.
Encourage and train the reader to break problems down into logical steps
Download
PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide
static HTML pages no longer cut it, you need to step up to dynamic,
database-driven sites that represent the future of the Web. In PHP and
MySQL for Dynamic Web Sites: Visual QuickPro Guide, the author of
best-selling guides to both the database program (MySQL) and the
scripting language (PHP) returns to cover the winning pair in
tandem—the way users work with them today to build dynamic sites using
Open Source tools. Using step-by-step instructions, clearly written
scripts, and expert tips to ease the way, author Larry Ullman
/http://www.amazon.com/exec/obidos/redirect?tag=songstech-20&path=ASIN%2F0321186486
discusses PHP and MySQL separately before going on to cover security,
sessions and cookies, and using additional Web tools, with several
sections devoted to creating sample applications. A companion Web site
includes source code and demonstrations of techniques used in the
volume. If you're already at home with HTML, you'll find this volume
the perfect launching pad to creating dynamic sites with PHP and MySQL.
Download Page
PHP books collection
Note:
links are tested only on mozila firefox. so please first download
mozila firefox brower to view full link. you can get it from right top
corner of this site. Internet explorer may cut some part of links.
Copy and paste the links in address bar and change 'hxxp' to 'http' and press enter:
index of parent directory
O'Reilly - Essential PHP.Security (October 2005).chm 369k Compiled HTML eBook
O'Reilly - PHP Cookbook.chm 1.2M Compiled HTML eBook
O'Reilly - PHP in a Nutshell (October 2005).chm 1.1M Compiled HTML eBook
O'Reilly - Programming PHP.chm 1.5M Compiled HTML eBook
hxxp://www.discordiaphile.com/books/PHP/
index of parent directory
(EN) Sams Teach Yourself PHP, MySQL and Apache All in One.chm 01-Jun-2005 15:06 4.2M
(eBook) - Professional PHP Programming.pdf 01-Jun-2005 15:08 18M
(ebook) Building PHP Applications With Macromedia Dreamweaver MX.pdf 01-Jun-2005 15:01 371K
(ebook) O'Reilly - PHP Cookbook.PDF 01-Jun-2005 15:03 2.6M
MySQL-PHP.pdf 01-Jun-2005 15:10 3.5M
PHP and MySQL - MySQL Bible.pdf 01-Jun-2005 15:15 6.3M
PHP and MySQL Web Dev.pdf 01-Jun-2005 15:15 7.1M
Sams.Teach.Yourself.PHP.MySQL.And.Apache.In.24Hours.eBook-LiB.chm 01-Jun-2005 15:17 3.3M
Wiley,.PHP.5.for.Dummies.(2004).DDU;.BM.OCR.6.0.ShareConnector.pdf 01-Jun-2005 15:18 5.9M
building a database-driven website using php and mysql.pdf 01-Jun-2005 15:06 342K
eBook_Web_Application_Development_With_PHP_4.0_ShareReactor.pdf 01-Jun-2005 15:10 6.3M
hxxp://www.csxix.com/ebook/PHP eBook/
index of parent directory
(ebook - pdf) - web application design with php4.pdf 19-Oct-2006 07:35 6.3M
(ebook-pdf) oreilly - programming php.pdf 19-Oct-2006 07:38 6.8M
sams teach yourself php 4 in 24 hours.pdf 19-Oct-2006 07:32 2.5M
hxxp://phattymatty.net/media/software/PHP/
John.Wiley.and.Sons.PHP.and.MySQL.for.Dummies.Second.Edition.Mar.2004.eBook-DDU.pdf 11-Mar-2005 17:04 9.5M
hxxp://www.astral.ro/~cata/carte/
index of parent direcotry
(ebook - CHM) Sams - Teach Yourself PHP MySQL and Apache in 24 Hours - 2003.chm 2 3.3 MB 2006-Aug-14
(ebook pdf) MySQL-PHP.pdf 11 3.5 MB 2006-Aug-14
Beginning PHP, Apache, MySQL Web Development.pdf 0 12.4 MB 2006-Aug-14
Dynamic Site with PHP_MySQL.pdf 7 611.9 KB 2006-Aug-14
mysql-php database applications.pdf 3 3.5 MB 2006-Aug-14
PHP & MySQL For Dummies®, 2nd Edition.pdf 5 9.5 MB 2006-Aug-14
php-mysql tutorial.pdf 0 196.7 KB 2006-Aug-14
PHP - SAMS - PHP and MySQL Web Development.pdf 0 7.0 MB 2006-Aug-14
PHP 5 and MySQL Bible.pdf 5 16.0 MB 2006-Aug-14
PHP and MySQL for Dummies - Second Edition.pdf 5 9.5 MB 2006-Aug-14
PHP and MySQL Web Dev.pdf 4 7.1 MB 2006-Aug-14
php_mysql_tutorial.pdf 0 1.1 MB 2006-Aug-14
Teach.Yourself.PHP.In.24hours.chm 12 2.2 MB 2006-Aug-14
Teach Yourself PHP, MySQL® and Apache All in One, Second Edition.chm 1 9.0 MB 2006-Aug-14
Teach Yourself PHP, MySQL and Apache - All-in-One 2003.chm 1 4.2 MB 2006-Aug-14
Web Database Applications with PHP & MySQL 2002.pdf 0 6.3 MB 2006-Aug-14
Web Database Application with PHP and MySQL, 2nd Edition.chm 1 2.6 MB 2006-Aug-14
Wiley - MySQL and PHP Database Applications, 2nd Ed - 2004.pdf 0 3.9 MB 2006-Aug-14
hxxp://haus-inc.org/DLSectional/index.php?dir=eBooks/PHP-n-MySQL/
PHP & MySQL For Dummies, 2nd Edition.pdf 19-Oct-2006 20:13 9.5M
PHP 5 and MySQL Bible.pdf 19-Oct-2006 19:56 16.0M
PHP.pdf 16-Oct-2006 18:04 18.0M
hxxp://users.telenet.be/1DR8/
hxxp://rapidshare.com/files/5953743/Spring_into_PHP_5_-_Addison_Wesley.chm
hxxp://rapidshare.com/files/5953019/SamPMA24.chm
hxxp://rapidshare.com/files/5952934/Prentice.Hall.PTR.PHP.5.Power.Programming.Oct.2004.eBook-LiB.chm
hxxp://rapidshare.com/files/5952503/Premier_Press_-_PHP_Professional_Projects__868_pages__-_2002.chm
hxxp://rapidshare.com/files/5951950/PHP_5_Recipes_A_Problem_Solution_Approach_-_APress.pdf
hxxp://rapidshare.com/files/5951778/PHP_5_for_Dummies_-_Wiley_2004.pdf
hxxp://rapidshare.com/files/5951553/PHP_5_Fast___Easy_Web_Development.chm
hxxp://rapidshare.com/files/5951222/OReilly.PHP.in.a.Nutshell.Oct.2005.chm
hxxp://rapidshare.com/files/5951171/OReilly.Essential.PHP.Security.Oct.2005.chm
hxxp://rapidshare.com/files/5951155/New_Riders_-_Php_Functions_Essential_Reference.chm
hxxp://rapidshare.com/files/5950946/McGraw-Hill.How.to.Do.Everything.with.PHP.and.MySQL.2005.LinG.pdf
hxxp://rapidshare.com/files/5950639/Advanced_Php_For_Web_Professionals_-_Prentice_Hall.chm
Friday, June 15, 2007
Safari Browser for Windows
Google renders weird on Win Safari...
Apple today announced that their Mac Safari browser is now also available on Windows. Apple calls this “the world’s best browser,” though Ionut Alex. Chitu in the Steve Jobs keynote thread disagrees, warning that “Safari/Windows uses a lot of RAM and it’s extremely slow. It also crashes every 3 minutes.”
What’s interesting is that the Windows version has the look &
feel of the Mac version even when it comes to elements which are
traditionally left to the operating system (less interface surprises =
better usability). For instance, when I maximize the browser window on
Win XP, then move my mouse towards the far top right to click (this is
usually the position of the close button “x”), the program currently behind
Safari will be closed (apparently because there’s a tiny pixel not
covered by the maximization; surprise!). As another example: I always
set my Windows task bar to auto-collapse to the left-hand side; with
Safari open, it won’t expand anymore, a barrier to switch between
different program windows... another surprise.
Maybe this is all to be excused as the program is still in Beta.
Then again, thanks to Google and others the word “Beta” pretty much
lost its meaning these days...
What is PHP:DataGrid?
PHP:DataGrid is the answer to the above problem. It's basically a PHP component, that's very similar to the ASP.NET DataGrid control. PHP:DataGrid will take care of all the boring tasks leaving you the easy and interesting parts. Very little PHP code is actually necessary for PHP:DataGrid, and you can change its looks and layout using simple HTML tags.
The only downside of PHP:DataGrid is that it's not free. You have to purchase it from TPG PHP Scripts, but it's $24.99 for a Developer license, which grants you permission to use it in all your personal projects, and I certainly believe that the advantages far outweigh the cost. Even only the time saved by PHP:DataGrid is already worth the cost for me. (editor's note: use coupon code phpit for a 10% discount!).
Let's have an actual look at PHP:DataGrid. If you don't want to purchase the component yourself, then you can always have a look at the demo's only.
The Basics
To create a new datagrid, we must use the php:datagrid tag. This tells the PHP:DataGrid component that a datagrid must be shown. The only thing that we must set is the name of the datagrid. This is a required attribute, and cannot be left out. A simple datagrid looks like this:
That's the only thing necessary to display a datagrid. But we're forgetting one thing - we haven't binded any data to the datagrid yet. If you forget to do this, nothing will be displayed, except for an error.
Binding Data
Binding data to a datagrid is really easy, and requires only one line of real PHP code. The PHP:DataGrid component automatically creates a variables called $_DATAGRID (not a superglobal, unfortunately). To bind data, you have to call the bind() method on the $_DATAGRID variable, like so:
That's all! The test datagrid will now be shown, with the data contained in the $data variable. The $data variable must be an array that was retrieved using mysql_fetch_array() and a loop (see the datagrid example below if you're unsure about this) or similar format. In any case, it should look like this:
(
[0] => Array
(
[id] => 1
[title] => Item 1
[category] => 4
)
[1] => Array
(
[id] => 2
[title] => Item 2
[category] => 7
)
[2] => Array
(
[id] => 3
[title] => Item 3
[category] => 3
)
)
The above is a valid $data array. It won't accept any other format, and an error will be shown if you do bind a different format.
An Example
The below code is a working example of a simple datagrid. It retrieves the 10 latest tutorials from the PHPit.net database, and shows it in a datagrid.
// Include PHP:DataGrid
include ('/path/to/phpdatagrid.php');
// Connect to database
$link = mysql_connect ('localhost', 'sa', '[db-pass]');
// Select database
mysql_select_db('phpit', $link);
// Do query and Get data
$result = mysql_query ("SELECT title, description, author, datetimestamp, filename FROM tutorial ORDER BY datetimestamp DESC LIMIT 0, 10");
$data = array();
while($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
array_push ($data, $row);
}
// Bind data (THIS IS IMPORTANT)
$_DATAGRID->bind ('test', $data);
[ View live demo ]
As you can see little code is used for the datagrid. Most of the code is actually spent on connecting to the MySQL database, and getting the data. If you use any kind of database class, this will be significantly easier.
If you have a look at the datagrid, you will notice that it looks ugly, and pretty bad. That's because we haven't added any styling at all. But that will have to wait until Part 2 of our DataGrid series.
Summary
In this part of our DataGrid series, we've looked at the basics of the PHP:DataGrid component: what it is, and how to put it on our website. But it doesn't look pretty yet, and in the next parts we'll be looking at creating a pretty datagrid, and talk about more of its functions (e.g. templates, inline editing, sorting and more!).
Click here to view the PHP:DataGrid Product PageTuesday, June 12, 2007
Useful Word Shortcut
Ctrl + Shift + A
AllCaps
Makes the selection all capitals (toggle)
2
Alt + Ctrl + 1
ApplyHeading1
Applies Heading 1 style to the selected text
3
Alt + Ctrl + 2
ApplyHeading2
Applies Heading 2 style to the selected text
4
Alt +
Ctrl + 3
ApplyHeading3
Applies Heading 3 style to the selected text
5
Ctrl + Shift + L
ApplyListBullet
Applies List Bullet style to the selected text
6
Alt + F10
AppMaximize
Enlarges the application window to full size
7
Alt + F5
AppRestore
Restores the application window to normal size
8
Ctrl+B
Bold
Makes the selection bold (toggle)
9
Ctrl + PgDn
BrowseNext
Jump to the next browse object
10
Ctrl + PgUp
BrowsePrev
Jump to the previous browse object
11
Alt + Ctrl + Home
BrowseSel
Select the next/prev browse object
12
Esc
Cancel
Terminates an action
13
Ctrl+E
CenterPara
Centers the paragraph between the indents
14
Shift+F3
ChangeCase
Changes the case of the letters in the selection
15
Left arrow
CharLeft
Moves the insertion point to the left one
character
16
Shift + Left arrow
CharLeftExtend
Extends the selection to the left one character
17
Rt arrow
CharRight
Moves the insertion point to the right one character
18
Shift + Rt arrow
CharRightExtend
Extends the selection to the right one character
19
Alt + Shift + C
ClosePane
Closes the active window pane (if you are in Normal View and have, for example, the Footnote pane open)
20
Alt+Drag (or press Ctrl + Shift + F8 and drag, but Alt + Drag is far easier!)
ColumnSelect
Selects a columnar block of text
21
Ctrl +Shift+C
CopyFormat
Copies the formatting of the selection
22
Shift + F2
CopyText
Makes a copy of the selection without using the clipboard (press Return to paste)
23
Alt + F3
CreateAutoText
Adds an AutoText entry to the active template
24
Ctrl+ Backspace
DeleteBackWord
Deletes the
previous word without putting it on the Clipboard
25
Ctrl + Del
DeleteWord
Deletes the next word without putting it on the Clipboard
26
Ctrl+W, Ctrl+F4
DocClose
Prompts to save the document and then closes the active window. (But doesn't intercept the menu command)
27
Ctrl + F10
DocMaximize
Enlarges the active window to full size
28
Ctrl + F7
DocMove
Changes the position of the active window
29
Ctrl + F5
DocRestore
Restores the window to normal size
30
Ctrl + F8
DocSize
Changes the size of the active window
31
Alt + Ctrl + S
DocSplit
Splits the active window horizontally and then adjusts the split
32
Alt + Shift + F9
DoFieldClick
Executes the action associated with macrobutton fields
33
Ctrl + Shift + D
DoubleUnderline
Double underlines the selection (toggle)
34
Alt R, G
DrawGroup
Groups the selected drawing objects
35
Alt R, I
DrawSnapToGrid
Sets up a grid for aligning drawing objects
36
Alt R, U
DrawUngroup
Ungroups the selected group of drawing objects
37
Ctrl+Shift+F5 (Or: Alt I, K)
EditBookmark
Brings up the bookmark dialog
38
Del
EditClear
Performs a forward delete or removes the selection without putting it on the Clipboard
39
Ctrl+C
EditCopy
Copies the selection and puts it on the Clipboard
40
Ctrl+X
EditCut
Cuts the selection and puts it on the Clipboard
41
Ctrl+F
EditFind
Finds the specified text or the specified formatting
42
F5, Ctrl+G
EditGoTo
Jumps to a specified place in the active document
43
Alt E, K
EditLinks
Allows links to be viewed, updated, opened, or removed
44
Ctrl+V
EditPaste
Inserts the Clipboard contents at the insertion
point
45
Alt E, S
EditPasteSpecial
Inserts the Clipboard contents as a linked object, embedded object, or other format
46
Alt + Shift + Backspc
EditRedo
Redoes the last action that was undone
47
F4
EditRedoOrRepeat
Repeats
the last command, or redoes the last action that was undone
(unfortunately, doesn't work for as many commands in Word 2000 as in
Word 97 and below, but this is still one of Word's most useful
shortcuts, if not the most useful)
48
Ctrl+H
EditReplace
Finds the specified text or the specified formatting and replaces it
49
Ctrl+A
EditSelectAll
Selects the entire document
50
Ctrl+Z
EditUndo
Reverses the last action
51
Alt + PageDn (to select to end of column, use Alt + Shift + PgDn)
EndOfColumn
Moves to the last cell in the current table column
52
Ctrl+Shift+End
EndOfDocExtend
Extends the selection to
the end of the last line of the document
53
Ctrl+End
EndOfDocument
Moves the insertion point to the end of the last line of the document
54
End
EndOfLine
Moves the insertion point to the end of the current line
55
Shift+End
EndOfLineExtend
Extends the selection to the end of the current line
56
Alt+End
EndOfRow
Moves to the last cell in the current row
57
Alt + Ctrl + PgDn
EndOfWindow
Moves the insertion point to the end of the last visible line on the screen
58
Shift + Alt + Ctrl + PgDn
EndOfWindowExtend
Extends the selection to the end of the last visible line on the screen
59
F8 (press Esc to turn off)
ExtendSelection
Turns on extend selection mode and then expands the selection with the direction keys
60
Alt + F4 (<9>)
FileCloseOrExit
Closes
the current document, or if no documents are open, quits Word. Horrible
command, as it makes it a long winded business to quit Word. But
there's a simple solution - assign Alt+F4 to FileExit instead.
61
Alt + F4 (Word 97)
FileExit
Quits
Microsoft Word and prompts to save the documents (does intercept the
menu item, but not the keyboard shortcut, or the x button. An AutoExit
macro is usually a better way of intercepting this).
62
NOT Ctrl+N!!
FileNew
Creates
a new document or template (brings up the dialog). Note that: Word
pretends that Ctrl+N is assigned to FileNew but it isn't, it's assigned
to FileNewDefault You can fix this in Word 2000 by assigning Ctrl+N to
the FileNewDialog command. In Word 97 the only way to fix it is to
create a macro called FileNew (to do this, press Alt + F8, type
"FileNew" without the quotes and Click "Create". The macro will
automatically contain the code needed to make it work).
63
Ctrl+N
FileNewDefault
Creates a new document based on the Normal
template.
64
Ctrl+O
FileOpen
Opens an existing document or template
65
Alt F, U
FilePageSetup
Changes the page setup of the selected sections
66
Ctrl + P
FilePrint
Prints the active document (brings up the dialog)
67
Ctrl+F2
FilePrintPreview
Displays full pages as they will be printed
68
Alt F, I
FileProperties
Shows the properties of the active document
69
Ctrl+S
FileSave
FileSave
70
Alt F, A (or F12)
FileSaveAs
Saves a copy of the document in a separate file (brings up the dialog)
71
Ctrl+Shift+F
Font
Activates the Fonts listbox on the formatting toolbar
72
Ctrl+Shift+P
FontSizeSelect
Activates the Font Size drop-down on the formatting toolbar
73
Alt + Ctrl + K
FormatAutoFormat
Automatically formats a document (or sometimes, automatically screws it up)
74
Alt O,
B
FormatBordersAndSha ding
Changes the borders and shading of the selected paragraphs, table cells, and pictures
75
Alt O, E
FormatChangeCase
Changes the case of the letters in the selection
76
Alt O, C
FormatColumns
Changes the column format of the selected sections (brings up the dialog)
77
Alt O, D
FormatDropCap
Formats the first character of current paragraph as a dropped capital (must select it first)
78
Ctrl+D
FormatFont
Brings up the Format + Font dialog
79
Alt + Shift + R
FormatHeaderFooterL ink
Links the current header/footer to the previous section (but does not intercept the button on the Header Footer toolbar)
80
Alt O, P
FormatParagraph
Brings up the Format Paragraph dialog
81
Alt O, S
FormatStyle
Applies, creates, or modifies styles
82
Alt O, T
FormatTabs
Brings up the Format Tabs dialog
83
Shift + F5
GoBack
Returns
to the previous insertion point (goes back to up to 3 points, then
returns to where you started; this is one of the most useful shortcuts
of them all. Also useful when opening a document, if you want to g
straight to where you were last editing it)
84
Ctrl + >
GrowFont
Increases the font size of the selection
85
Ctrl + ]
GrowFontOnePoint
Increases the font size of the selection by one point
86
Ctrl + T (or drag the ruler)
HangingIndent
Increases the hanging indent
87
F1
Help
Microsoft Word Help
88
Shift + F1
HelpTool
Lets you get help on a command or screen region or examine text properties
89
Ctrl + Shift + H
Hidden
Makes the selection hidden text (toggle)
90
Click on it
HyperlinkOpen
Connect to a hyperlink's address
91
Ctrl + M (or drag the ruler)
Indent
Moves
the left indent to the next tab stop
92
Alt + Ctrl + M (or Alt I, M)
InsertAnnotation
Inserts a comment
93
F3
InsertAutoText
Replaces the name of the AutoText entry with its contents
94
Alt I, B
InsertBreak
Ends a page, column, or section at the insertion point
95
Alt I, C
InsertCaption
Inserts a caption above or below a selected object
96
Ctrl + Shift + Return
InsertColumnBreak
Inserts a column break at the insertion point
97
Alt + Shift + D
InsertDateField
Inserts a date field
98
Alt + Ctrl + D
InsertEndnoteNow
Inserts an endnote reference at the insertion point without displaying the dialog
99
Alt I, F
InsertField
Inserts a field in the active document
100
Ctrl+F9
InsertFieldChars
Inserts an empty field with the enclosing field characters
101
Alt I, L
InsertFile
Inserts the
text of another file into the active document
102
Alt I, N
InsertFootnote
Inserts a footnote or endnote reference at the insertion point
103
Alt + Ctrl + F
InsertFootnoteNow
Inserts a footnote reference at the insertion point without displaying the dialog
104
Ctrl + K
InsertHyperlink
Insert Hyperlink
105
Alt I, D
InsertIndexAndTable s
Inserts an index or a table of contents, figures, or authorities into the document
106
Alt + Ctrl + L
InsertListNumField
Inserts a ListNum Field
107
Alt + Shift + F
InsertMergeField
Brings
up a dialog to insert a mail merge field at the insertion point. (It
does not intercept the button on the Mail merge. toolbar)
108
Ctrl + Return
InsertPageBreak
Inserts a page break at the insertion point
109
Alt + Shift + P
InsertPageField
Inserts a page number field
110
Ctrl + Shift + F3
InsertSpike
Empties the spike AutoText entry and inserts all of its contents into the document
111
Alt + Shift + T
InsertTimeField
Inserts a time field
112
Ctrl + I
Italic
Makes the selection italic (toggle)
113
Ctrl + J
JustifyPara
Aligns the paragraph at both the left and the right indent
114
Ctrl + L
LeftPara
Aligns the paragraph at the left indent
115
Down arrow
LineDown
Moves the insertion point down one line
116
Shift + down arrow
LineDownExtend
Extends the selection down one line
117
Up arrow
LineUp
Moves the insertion point up one line
118
Shift + up arrow
LineUpExtend
Extends the selection up one line
119
Ctrl + F11
LockFields
Locks the selected fields to prevent updating
120
Alt + Shift + K
MailMergeCheck
Checks for errors in a mail merge
121
Alt+Shift+E
MailMergeEditDataSo urce
Lets you edit a mail merge data source
122
Alt + Shift + N
MailMergeToDoc
Collects the results of the mail merge in a document
123
Alt Shift + M
MailMergeToPrinter
Sends the results of the mail merge to the printer
124
Alt + Shift + I
MarkCitation
Marks the text you want to include in the table of authorities
125
Alt + Shift + X
MarkIndexEntry
Marks the text you want to include in the index
126
Alt + Shift + O
MarkTableOfContents Entry
Inserts a TC field (but it is far better to use Heading Styles to generate your Table of Contents instead)
127
Alt or F10
MenuMode
Makes the menu bar active
128
Alt + Shift + F11
MicrosoftScriptEdit or
Starts
or switches to Microsoft Development Environment application, allowing
you to view the HTML/XML source code that would be behind the document
if it were in ..htm format (or that is behind it if it already is in
.htm format).
129
Alt + Ctrl + F1
MicrosoftSystemInfo
Execute the Microsoft System Info application
130
F2
MoveText
Moves the selection to a specified location without using the clipboard (press Return to execute the more)
131
Tab
NextCell
Moves to the next table cell
132
F11
NextField
Moves to the next field
133
Alt + F7
NextMisspelling
Find next spelling error
134
Alt + down arrow
NextObject
Moves to the next object on the page
135
Ctrl + F6
NextWindow
Switches to the next document window, equivalent to selecting a document from the Window menu.
136
Ctrl+Shift+N
NormalStyle
Applies the Normal style
137
Ctrl + 0
OpenOrCloseUpPara
Sets or removes extra spacing above the selected paragraph
138
F6
OtherPane
Switches
to another window pane in Normal View (for instance, if you have if you
have a Footnotes pane open in Normal view and want to switch to the
main document and back without closing the pane).
139
Alt + _
OutlineCollapse
Collapses an Outline in Outline View by one level
140
Alt+Shift+rt arrow
OutlineDemote
Demotes the selected paragraphs one heading level
141
Alt + +
OutlineExpand
Expands an Outline in Outline View by one level
142
Alt+Shift+down arrow
OutlineMoveDown
Moves the selection below the next item in the outline
143
Alt+Shift+up arrow
OutlineMoveUp
Moves the selection above the previous item in the outline
144
Alt+Shift+left arrow
OutlinePromote
Promotes the selected paragraphs one heading level
145
Alt + Shift + L
OutlineShowFirstLin e
Toggles between showing the first line of each paragraph only or showing all of the body text in
the outline
146
Ins
Overtype
Toggles the typing mode between replacing and inserting
147
PgDn
PageDown
Moves the insertion point and document display to the next screen of text
148
Shift+ PgDn
PageDownExtend
Extends the selection and changes the document display to the next screen of text
149
PgUp
PageUp
Moves the insertion point and document display to the previous screen of text
150
Shift + PgUp
PageUpExtend
Extends the selection and changes the document display to the previous screen of text
151
Ctrl + down arrow
ParaDown
Moves the insertion point to the beginning of the next paragraph
152
Shift + Ctrl + down arrow
ParaDownExtend
Extends the selection to the beginning of the next paragraph
153
Ctrl + up arrow
ParaUp
Moves the insertion point to the beginning of the previous paragraph
154
Shift + Ctrl
+ up arrow
ParaUpExtend
Extends the selection to the beginning of the previous paragraph
155
Ctrl+Shift+V
PasteFormat
Applies the previously copied formatting to selection
156
Shift + Tab
PrevCell
Moves to the previous table cell
157
Shift + F11
PrevField
Moves to the previous field
158
Alt + up arrow
PrevObject
Moves to the previous object on the page
159
Ctrl + Shift + F6
PrevWindow
Switches back to the previous document window
160
Sfift+F4
RepeatFind
Repeats Go To or Find to find the next occurrence
161
Ctrl+Spacebar
ResetChar
Makes the selection the default character format of the applied style
162
Ctrl+Q
ResetPara
Makes the selection the default paragraph format of the applied style
163
Ctrl +R
RightPara
Aligns the paragraph at the right indent
164
Ctrl + *
ShowAll
Shows/hides all nonprinting characters
165
Alt + Shift + A
ShowAllHeadings
Displays all of the heading levels and the body text in Outline View
166
Ctrl + <
ShrinkFont
Decreases the font size of the selection
167
Ctrl + [
ShrinkFontOnePoint
Decreases the font size of the selection by one point
168
Ctrl + Shift + K
SmallCaps
Makes the selection small capitals (toggle)
169
Ctrl + 1
SpacePara1
Sets the line spacing to single space
170
Ctrl + 5
SpacePara15
Sets the line spacing to one-and-one- half space
171
Ctrl + 2
SpacePara2
Sets the line spacing to double space
172
Ctrl + F3
Spike
Deletes
the selection and adds it to the "Spike" AutoText entry (which allows
you to move text and graphics from nonadjacent locations)
173
Alt + PgUp
StartOfColumn
Moves to the first cell in the current column
174
Ctrl+Shift+Home
StartOfDocExtend
Extends the selection to the beginning of the first line of the document
175
Ctrl +Home
StartOfDocument
Moves the insertion point to the beginning of the first line of the document
176
Home
StartOfLine
Moves the insertion point to the beginning of the current line
177
Shift+Home
StartOfLineExtend
Extends the selection to the beginning of the current line
178
Alt+Home
StartOfRow
Moves to the first cell in the current row
179
Alt+Ctrl+PgUp
StartOfWindow
Moves the insertion point to the beginning of the first visible line on the screen
180
Shift+ Alt+Ctrl+PgUp
StartOfWindowExtend
Extends the selection to the beginning of the first visible line on the screen
181
Strl + Shift + S
Style
Activates the Style drop-down on the Formatting toolbar
182
Ctrl + =
Subscript
Makes the selection subscript (toggle)
183
Ctrl + +
Superscript
Makes the selection superscript (toggle)
184
Ctrl + Shift + Q
SymbolFont
Applies the Symbol font to the selection
185
Alt A, F
TableAutoFormat
Applies a set of formatting to a table
186
Alt A, H
TableHeadings
Toggles table headings attribute on and off
187
Alt + click
(Alt + drag to select several)
TableSelectColumn
Selects the current column in a table
188
Click in left margin
TableSelectRow
Selects the current row in a table
189
Alt + double-click
TableSelectTable
Selects an entire table
190
Alt + Ctrl + U
TableUpdateAutoForm at
Updates the table formatting to match the applied Table Autoformat settings
191
Shift + F9 (Alt + F9 toggles all field codes on or off)
ToggleFieldDisplay
Shows the field codes or the results for the
selection (toggle)
192
Alt T, C
ToolsCustomize
Allows
you to customizes the Word user interface (menus, keyboard and
toolbars) and store the customizations in a template (defaults to
Normal.dot, so be careful!)
193
Alt + F8
ToolsMacro
Runs, creates, deletes, or revises a macro
194
F7
ToolsProofing
Checks the spelling and grammar in the active document
195
Ctr.l + Shift + E
ToolsRevisionMarksT oggle
Toggles track changes for the active document
196
Shift + F7
ToolsThesaurus
Finds a synonym for the selected word
197
Ctrl+U
Underline
Formats the selection with a continuous underline (toggle)
198
Ctrl + Shift + T
(or drag the ruler)
UnHang
Decreases the hanging indent
199
Ctrl + Shift + M
(or drag the ruler)
UnIndent
Moves the left indent to the previous tab stop
200
Ctrl+Shift+F9
UnlinkFields
Permanently replaces the field codes with the results
201
Ctrl + Shift + F11
UnlockFields
Unlocks the selected fields for updating
202
F9
UpdateFields
Updates and displays the results of the selected fields
203
Ctrl + Shiift + F7
UpdateSource
Copies the modified text of a linked file back to its source file
204
Hover over comment
ViewAnnotations
Show or hide the comment pane
205
Dbl-click the endnote reference
ViewEndnoteArea
If
in Normal View, opens a pane for viewing and editing the endnote
(toggle). If in Page/Print Layout View, switches from the body text to
the endnote or vice versa
206
At + F9
ViewFieldCodes
Shows the field codes or results for all fields (toggle)
207
Dbl-click the footnote reference
ViewFootnoteArea
If in Normal View, opens a pane for viewing and editing the footnote (toggle). If in Page/Print Layout View,
switches from the body text to the footnote or vice versa.
208
Alt V, F
ViewFootnotes
If
in Normal View, opens a pane for viewing and editing footnotes and
endnotes (toggle). If in Page/Print Layout View, switches from the body
text to the footnotes/endnotes or vice versa.
209
Alt V, H
ViewHeader
Displays header in page layout view
210
Alt V, N
(or Alt + Ctrl + N)
ViewNormal
Changes the editing view to normal view
211
Alt V, O
(or Alt + Ctrl + O)
ViewOutline
Displays a document's outline
212
Alt V, P
(or Alt + Ctrl + P)
ViewPage
Displays
the page more-or-less as it will be printed, and allows editing (In
Word 2000 the menu item is called Print Layout, but fortunately the
command hasn't changed.
213
Alt + F11
ViewVBCode
Shows the VB editing environment (Tools + Macro + Visual Basic Editor)
214
Alt + left arrow
WebGoBack
Backward
hyperlink (useful if you clicked on a page number hyperlink in the
table of contents and then want to return to the TOC)
215
Alt + rt arrow
WebGoForward
Forward hyperlink
216
Alt W, A
WindowArrangeAll
Arranges windows as non-overlapping tiles
217
Ctrl + left arrow
WordLeft
Moves the insertion point to the left one word
218
Shift + Ctrl + left arrow
WordLeftExtend
Extends the selection to the left one word
219
Ctrl + rt arrow
WordRight
Moves the insertion point to the right one word
220
Shift + Ctrl + rt arrow
WordRightExtend
Extends the selection to the right one word
221
Ctrl + Shift + W
WordUnderline
Underlines the words but not the spaces in the selection (toggle)
Monday, June 11, 2007
Microsoft Excel - Useful Shortcut Keys
Ctrl+A | Select All | None |
Ctrl+B | Bold | Format, Cells, Font, Font Style, Bold |
Ctrl+C | Copy | Edit, Copy |
Ctrl+D | Fill Down | Edit, Fill, Down |
Ctrl+F | Find | Edit, Find |
Ctrl+G | Goto | Edit, Goto |
Ctrl+H | Replace | Edit, Replace |
Ctrl+I | Italic | Format, Cells, Font, Font Style, Italic |
Ctrl+K | Insert Hyperlink | Insert, Hyperlink |
Ctrl+N | New Workbook | File, New |
Ctrl+O | Open | File, Open |
Ctrl+P | Print | File, Print |
Ctrl+R | Fill Right | Edit, Fill Right |
Ctrl+S | Save | File, Save |
Ctrl+U | Underline | Format, Cells, Font, Underline, Single |
Ctrl+V | Paste | Edit, Paste |
Ctrl W | Close | File, Close |
Ctrl+X | Cut | Edit, Cut |
Ctrl+Y | Repeat | Edit, Repeat |
Ctrl+Z | Undo | Edit, Undo |
F1 | Help | Help, Contents and Index |
F2 | Edit | None |
F3 | Paste Name | Insert, Name, Paste |
F4 | Repeat last action | Edit, Repeat. Works while not in Edit mode. |
F4 | While typing a formula, switch between absolute/relative refs | None |
F5 | Goto | Edit, Goto |
F6 | Next Pane | None |
F7 | Spell check | Tools, Spelling |
F8 | Extend mode | None |
F9 | Recalculate all workbooks | Tools, Options, Calculation, Calc,Now |
F10 | Activate Menubar | N/A |
F11 | New Chart | Insert, Chart |
F12 | Save As | File, Save As |
Ctrl+: | Insert Current Time | None |
Ctrl+; | Insert Current Date | None |
Ctrl+" | Copy Value from Cell Above | Edit, Paste Special, Value |
Ctrl+’ | Copy Fromula from Cell Above | Edit, Copy |
Shift | Hold down shift for additional functions in Excel’s menu | none |
Shift+F1 | What’s This? | Help, What’s This? |
Shift+F2 | Edit cell comment | Insert, Edit Comments |
Shift+F3 | Paste function into formula | Insert, Function |
Shift+F4 | Find Next | Edit, Find, Find Next |
Shift+F5 | Find | Edit, Find, Find Next |
Shift+F6 | Previous Pane | None |
Shift+F8 | Add to selection | None |
Shift+F9 | Calculate active worksheet | Calc Sheet |
Shift+F10 | Display shortcut menu | None |
Shift+F11 | New worksheet | Insert, Worksheet |
Shift+F12 | Save | File, Save |
Ctrl+F3 | Define name | Insert, Names, Define |
Ctrl+F4 | Close | File, Close |
Ctrl+F5 | XL, Restore window size | Restore |
Ctrl+F6 | Next workbook window | Window, ... |
Shift+Ctrl+F6 | Previous workbook window | Window, ... |
Ctrl+F7 | Move window | XL, Move |
Ctrl+F8 | Resize window | XL, Size |
Ctrl+F9 | Minimize workbook | XL, Minimize |
Ctrl+F10 | Maximize or restore window | XL, Maximize |
Ctrl+F11 | Inset 4.0 Macro sheet | None in Excel 97. In versions prior to 97 - Insert, Macro, 4.0 Macro |
Ctrl+F12 | File Open | File, Open |
Alt+F1 | Insert Chart | Insert, Chart... |
Alt+F2 | Save As | File, Save As |
Alt+F4 | Exit | File, Exit |
Alt+F8 | Macro dialog box | Tools, Macro, Macros in Excel 97 Tools,Macros - in earlier versions |
Alt+F11 | Visual Basic Editor | Tools, Macro, Visual Basic Editor |
Ctrl+Shift+F3 | Create name by using names of row and column labels | Insert, Name, Create |
Ctrl+Shift+F6 | Previous Window | Window, ... |
Ctrl+Shift+F12 | Print | File, Print |
Alt+Shift+F1 | New worksheet | Insert, Worksheet |
Alt+Shift+F2 | Save | File, Save |
Alt+= | AutoSum | No direct equivalent |
Ctrl+` | Toggle Value/Formula display | Tools, Options, View, Formulas |
Ctrl+Shift+A | Insert argument names into formula | No direct equivalent |
Alt+Down arrow | Display AutoComplete list | None |
Alt+’ | Format Style dialog box | Format, Style |
Ctrl+Shift+~ | General format | Format, Cells, Number, Category, General |
Ctrl+Shift+! | Comma format | Format, Cells, Number, Category, Number |
Ctrl+Shift+@ | Time format | Format, Cells, Number, Category, Time |
Ctrl+Shift+# | Date format | Format, Cells, Number, Category, Date |
Ctrl+Shift+$ | Currency format | Format, Cells, Number, Category, Currency |
Ctrl+Shift+% | Percent format | Format, Cells, Number, Category, Percentage |
Ctrl+Shift+^ | Exponential format | Format, Cells, Number, Category, |
Ctrl+Shift+& | Place outline border around selected cells | Format, Cells, Border |
Ctrl+Shift+_ | Remove outline border | Format, Cells, Border |
Ctrl+Shift+* | Select current region | Edit, Goto, Special, Current Region |
Ctrl++ | Insert | Insert, (Rows, Columns, or Cells) Depends on selection |
Ctrl+- | Delete | Delete, (Rows, Columns, or Cells) Depends on selection |
Ctrl+1 | Format cells dialog box | Format, Cells |
Ctrl+2 | Bold | Format, Cells, Font, Font Style, Bold |
Ctrl+3 | Italic | Format, Cells, Font, Font Style, Italic |
Ctrl+4 | Underline | Format, Cells, Font, Font Style, Underline |
Ctrl+5 | Strikethrough | Format, Cells, Font, Effects, Strikethrough |
Ctrl+6 | Show/Hide objects | Tools, Options, View, Objects, Show All/Hide |
Ctrl+7 | Show/Hide Standard toolbar | View, Toolbars, Stardard |
Ctrl+8 | Toggle Outline symbols | None |
Ctrl+9 | Hide rows | Format, Row, Hide |
Ctrl+0 | Hide columns | Format, Column, Hide |
Ctrl+Shift+( | Unhide rows | Format, Row, Unhide |
Ctrl+Shift+) | Unhide columns | Format, Column, Unhide |
Alt or F10 | Activate the menu | None |
Ctrl+Tab | In toolbar: next toolbar | None |
Shift+Ctrl+Tab | In toolbar: previous toolbar | None |
Ctrl+Tab | In a workbook: activate next workbook | None |
Shift+Ctrl+Tab | In a workbook: activate previous workbook | None |
Tab | Next tool | None |
Shift+Tab | Previous tool | None |
Enter | Do the command | None |
Shift+Ctrl+F | Font Drop Down List | Format, Cells, Font |
Shift+Ctrl+F+ F | Font tab of Format Cell Dialog box | Format, Cells, Font |
Shift+Ctrl+P | Point size Drop Down List | Format, Cells, Font |
- CTRL combination shortcut keys -
- Key Description -
CTRL+( Unhides any hidden rows within the selection.
CTRL+) Unhides any hidden columns within the selection.
CTRL+& Applies the outline border to the selected cells.
CTRL+_ Removes the outline border from the selected cells.
CTRL+~ Applies the General number format.
CTRL+$ Applies the Currency format with two decimal places (negative numbers in parentheses) .
CTRL+% Applies the Percentage format with no decimal places.
CTRL+^ Applies the Exponential number format with two decimal places.
CTRL+# Applies the Date format with the day, month, and year.
CTRL+@ Applies the Time format with the hour and minute, and AM or PM.
CTRL+! Applies the Number format with two decimal places, thousands separator, and minus sign (-) for negative values.
CTRL+- Displays the Delete dialog box to delete the selected cells.
CTRL+* Selects the current region around the active cell (the data area enclosed by blank rows and blank columns).
In a PivotTable, it selects the entire PivotTable report.
CTRL+: Enters the current time.
CTRL+; Enters the current date.
CTRL+` Alternates between displaying cell values and displaying formulas in the worksheet.
CTRL+' Copies a formula from the cell above the active cell into the cell or the Formula Bar.
CTRL+" Copies the value from the cell above the active cell into the cell or the Formula Bar.
CTRL++ Displays the Insert dialog box to insert blank cells.
CTRL+1 Displays the Format Cells dialog box.
CTRL+2 Applies or removes bold formatting.
CTRL+3 Applies or removes italic formatting.
CTRL+4 Applies or removes underlining.
CTRL+5 Applies or removes strikethrough.
CTRL+6 Alternates between hiding objects, displaying objects, and displaying placeholders for objects.
CTRL+7 Displays or hides the Standard toolbar.
CTRL+8 Displays or hides the outline symbols.
CTRL+9 Hides the selected rows.
CTRL+0 Hides the selected columns.
CTRL+A Selects the entire worksheet.
If the worksheet contains data, CTRL+A selects the current region. Pressing CTRL+A a second time selects the entire worksheet.
When the insertion point is to the right of a function name in a formula, displays the Function Arguments dialog box.
CTRL+SHIFT+A inserts the argument names and parentheses when the insertion point is to the right of a function name in a formula.
CTRL+B Applies or removes bold formatting.
CTRL+C Copies the selected cells.
CTRL+C followed by another CTRL+C displays the Microsoft Office Clipboard.
CTRL+D Uses the Fill Down command to copy the contents and format of the topmost cell of a selected range into the cells below.
CTRL+F Displays the Find dialog box.
SHIFT+F5 also displays this dialog box, while SHIFT+F4 repeats the last Find action.
CTRL+G Displays the Go To dialog box.
F5 also displays this dialog box.
CTRL+H Displays the Find and Replace dialog box.
CTRL+I Applies or removes italic formatting.
CTRL+K Displays the Insert Hyperlink dialog box for new hyperlinks or the Edit Hyperlink dialog box for selected existing hyperlinks.
CTRL+L Displays the Create List dialog box.
CTRL+N Creates a new, blank file.
CTRL+O Displays the Open dialog box to open or find a file.
CTRL+SHIFT+O selects all cells that contain comments.
CTRL+P Displays the Print dialog box.
CTRL+R Uses the Fill Right command to copy the contents and format of the leftmost cell of a selected range into the cells to the right.
CTRL+S Saves the active file with its current file name, location, and file format.
CTRL+U Applies or removes underlining.
CTRL+V Inserts the contents of the Clipboard at the insertion point and replaces any selection. Available only after you cut or copied an object, text, or cell contents.
CTRL+W Closes the selected workbook window.
CTRL+X Cuts the selected cells.
CTRL+Y Repeats the last command or action, if possible.
CTRL+Z Uses the Undo command to reverse the last command or to delete the last entry you typed.
CTRL+SHIFT+Z uses the Undo or Redo command to reverse or restore the last automatic correction when AutoCorrect Smart Tags are displayed.
- Function keys -
F1 Displays the Help task pane.
CTRL+F1 closes and reopens the current task pane.
ALT+F1 creates a chart of the data in the current range.
ALT+SHIFT+F1 inserts a new worksheet.
F2 Edits the active cell and positions the insertion point at the end of the cell contents. It also moves the insertion point into the Formula Bar when editing in a cell is turned off.
SHIFT+F2 edits a cell comment.
F3 Pastes a defined name into a formula.
SHIFT+F3 displays the Insert Function dialog box.
F4 Repeats the last command or action, if possible.
CTRL+F4 closes the selected workbook window.
F5 Displays the Go To dialog box.
CTRL+F5 restores the window size of the selected workbook window.
F6 Switches to the next pane in a worksheet that has been split (Window menu,
SHIFT+F6 switches to the previous pane in a worksheet that has been split.
CTRL+F6 switches to the next workbook window when more than one workbook window is open.
Note When the task pane is visible, F6 and SHIFT+F6 include that pane when switching between panes.
F7 Displays the Spelling dialog box to check spelling in the active worksheet or selected range.
CTRL+F7 performs the Move command on the workbook window when it is not maximized. Use the arrow keys to move the window, and when finished press ESC.
F8 Turns extend mode on or off. In extend mode, EXT appears in the status line, and the arrow keys extend the selection.
SHIFT+F8 enables you to add a non-adjacent cell or range to a selection of cells by using the arrow keys.
CTRL+F8 performs the Size command (on the Control menu for the workbook window) when a workbook is not maximized.
ALT+F8 displays the Macro dialog box to run, edit, or delete a macro.
F9 Calculates all worksheets in all open workbooks.
F9 followed by ENTER (or followed by CTRL+SHIFT+ENTER for array formulas) calculates the selected a portion of a formula and replaces the selected portion with the calculated value.
SHIFT+F9 calculates the active worksheet.
CTRL+ALT+F9 calculates all worksheets in all open workbooks, regardless of whether they have changed since the last calculation.
CTRL+ALT+SHIFT+ F9 rechecks dependent formulas, and then calculates all cells in all open workbooks, including cells not marked as needing to be calculated.
CTRL+F9 minimizes a workbook window to an icon.
F10 Selects the menu bar or closes an open menu and submenu at the same time.
SHIFT+F10 displays the shortcut menu for a selected item.
ALT+SHIFT+F10 displays the menu or message for a smart tag. If more than one smart tag is present, it switches to the next smart tag and displays its menu or message.
CTRL+F10 maximizes or restores the selected workbook window.
F11 Creates a chart of the data in the current range.
SHIFT+F11 inserts a new worksheet.
ALT+F11 opens the Visual Basic Editor, in which you can create a macro by using Visual Basic for Applications (VBA).
ALT+SHIFT+F11 opens the Microsoft Script Editor, where you can add text, edit HTML tags, and modify any script code.
F12 Displays the Save As dialog box.
- Other useful shortcut keys -
ARROW KEYS Move one cell up, down, left, or right in a worksheet.
CTRL+ARROW KEY moves to the edge of the current data region (data region: A range of cells that contains data and that is bounded by empty cells or datasheet borders.) in a worksheet.
SHIFT+ARROW KEY extends the selection of cells by one cell.
CTRL+SHIFT+ARROW KEY extends the selection of cells to the last nonblank cell in the same column or row as the active cell.
LEFT ARROW or RIGHT ARROW selects the menu to the left or right when a menu is visible. When a submenu is open, these arrow keys switch between the main menu and the submenu.
DOWN ARROW or UP ARROW selects the next or previous command when a menu or submenu is open.
In a dialog box, arrow keys move between options in an open drop-down list, or between options in a group of options.
ALT+DOWN ARROW opens a selected drop-down list.
BACKSPACE Deletes one character to the left in the Formula Bar.
Also clears the content of the active cell.
DELETE Removes the cell contents (data and formulas) from selected cells without affecting cell formats or comments.
In cell editing mode, it deletes the character to the right of the insertion point.
END Moves to the cell in the lower-right corner of the window when SCROLL LOCK is turned on.
Also selects the last command on the menu when a menu or submenu is visible.
CTRL+END moves to the last cell on a worksheet, in the lowest used row of the rightmost used column.
CTRL+SHIFT+END extends the selection of cells to the last used cell on the worksheet (lower-right corner).
ENTER Completes a cell entry from the cell or the Formula Bar, and selects the cell below (by default).
In a data form, it moves to the first field in the next record.
Opens a selected menu (press F10 to activate the menu bar) or performs the action for a selected command.
In a dialog box, it performs the action for the default command button in the dialog box (the button with the bold outline, often the OK button).
ALT+ENTER starts a new line in the same cell.
CTRL+ENTER fills the selected cell range with the current entry.
SHIFT+ENTER completes a cell entry and selects the cell above.
ESC Cancels an entry in the cell or Formula Bar.
It also closes an open menu or submenu, dialog box, or message window.
HOME Moves to the beginning of a row in a worksheet.
Moves to the cell in the upper-left corner of the window when SCROLL LOCK is turned on.
Selects the first command on the menu when a menu or submenu is visible.
CTRL+HOME moves to the beginning of a worksheet.
CTRL+SHIFT+HOME extends the selection of cells to the beginning of the worksheet.
PAGE DOWN Moves one screen down in a worksheet.
ALT+PAGE DOWN moves one screen to the right in a worksheet.
CTRL+PAGE DOWN moves to the next sheet in a workbook.
CTRL+SHIFT+PAGE DOWN selects the current and next sheet in a workbook.
PAGE UP Moves one screen up in a worksheet.
ALT+PAGE UP moves one screen to the left in a worksheet.
CTRL+PAGE UP moves to the previous sheet in a workbook.
CTRL+SHIFT+PAGE UP selects the current and previous sheet in a workbook.
SPACEBAR In a dialog box, performs the action for the selected button, or selects or clears a check box.
CTRL+SPACEBAR selects an entire column in a worksheet.
SHIFT+SPACEBAR selects an entire row in a worksheet.
CTRL+SHIFT+SPACEBAR selects the entire worksheet.
If the worksheet contains data, CTRL+SHIFT+SPACEBAR selects the current region. Pressing CTRL+SHIFT+SPACEBAR a second time selects the entire worksheet.
When an object is selected, CTRL+SHIFT+SPACEBAR selects all objects on a worksheet.
ALT+SPACEBAR displays the Control menu for the Excel window.
TAB Moves one cell to the right in a worksheet.
Moves between unlocked cells in a protected worksheet.
Moves to the next option or option group in a dialog box.
SHIFT+TAB moves to the previous cell in a worksheet or the previous option in a dialog box.
CTRL+TAB switches to the next tab in dialog box.
CTRL+SHIFT+TAB switches to the previous tab in a dialog box.