Archive for the ‘Tools’ Category

How to make all content visible in a cell – Wrap Text Microsoft Excel

When we type some long text in a excel column it would overlap the other columns.To avoid this and make the full content visible there is a  Microsoft office excel tip.

UnWarpped Text
Select the cell(s) to wrap.
ToWarp
click on Home Tab Wrap Text.
We can also see the Microsoft help describing the Wrap Text feature in excel.
WarppedText
That’s it.Now the cell is fully visible in the Excel 2007 file.

Popularity: 1% [?]

How to Convert a Rows to Columns – Columns to Rows in Excel

There are times we need to convert excel rows to columns.Excel inbuilt has a option to do this in easy steps.

Rows to Columns

Step 1 : Select the all rows to be converted as columns and copy them.

Copy rows in excel

Step 2 : Click in any empty cell and right click and select  Paste Special option from it.

Paste-Special

Step 3 : A popup could come, from it check Transpose.

Transpose

That’s it.See the result.

Rows to Column

The same steps applies for converting columns to rows.

Popularity: 1% [?]

How to share files between Linux systems

Even for a newbie, the Giver application will be very helpful in sharing files between Linux systems. Giver has been hosted in Google code. Its easy to install and very easy to use. I will explain you how to install and use Giver. I am using the application in Ubuntu 10.04.

Installation

  1. Open the ‘Terminal
  2. Enter the following command. sudo apt-get install giver
  3. This will install the application under Applications -> Internet menu

Use Giver

  • Applications -> Internet -> Giver or enter ‘giver‘ in the terminal
  • Giver application showing the list of Recipients for you

This opens up the Giver and you will see Giver iconGiver Icon in the notification area in the notification area

  • The Giver window will show the list of computers in which Giver is running currently.
  • To send a file to a computer. click on that computer from the list, will popup a menu asking either to send a file or folder.
  • Choose necessary option to show the Open dialog box, [ I am choosing 'Send a file' ]Choose the file and click open.
  • The user in the selected computer will be prompted to either accept the file or decline.
  • After ‘Accept’ button is clicked, the file transfer gets started. once transfer is done both the users were notified.

Sender will be intimated with Successful transfer message

  • You can configure ‘Giver’ where to save the files received; by opening up its preferences. Default location is user ‘Desktop’
  • To open the ‘Preferences’, right click on the Giver icon in the notification area and select ‘Preferences’ Open Giver Preferences
  • The Preferences dialog box will open. You can change your giver name to be displayed for all your recipients, your profile picture and the location where all your received files/ folders are to be stored. After configuring click ‘Close’

Popularity: 1% [?]

How to Verify an Email address is valid Or Check if an Email address is available?

At times you would want to verify the sender is valid or not of the mail received.And also you may want to check an email address is available or already taken.VerifyEmailAddress helps us to do them.

Just go http://www.verifyemailaddress.org and type an email address you want to check.

It Verifies the email id and gives the result as valid or invalid email address.

Invalid Check Result

Valid Check Result

Popularity: 2% [?]

How to Open .docx/.xlsx/.pptx Extension File Without Microsoft Office Installed

The later versions of Microsoft Office has the word document extension as .docx instead of the older extension .doc.Suppose if you want to open a word document with .docx extension but you don’t have the latest/compatible version to open them,there are different ways to view them.

View using older Microsoft office – Microsoft Office Compatibility Pack

Microsoft has a compatible pack to view newer version documents in older version office.The Microsoft Office Compatibility Pack can be downloaded from here

View using Google Docs

The document can be uploaded to Google docs and viewed.Thus no softwares have to be installed.

View using Open Office

Open Office is a open-source office suite.By installing Open Office the documents can be viewed
through it.

View using on-line tools or converters

There are several on-line tools and converters available which can be downloaded and used to convert the documents.
On line Tools : zamzar ,ThinkFree
Converter Softwares : docx-converter , docx2doc

Popularity: 3% [?]

Lighttpd Web Server

lhttpd logoLIGHTTPD (pronounced by Lighty) is an opensource webserver for Security, Speed, compliance and flexibility. Its been optimized for high performance environments. With a small memory footprint, effective management of CPU load and advanced features like FastCGI, SCGI, Auth, Output compression and URL rewriting; lighttpd is the perfect solution for servers suffering from load problems.

lighttpd powers several popular Web 2.0 sites like YouTube, Wikipedia and Meebo. Its high speed io-infrastructure allows them to scale several times better with the same hardware than with alternative web-servers. Its event-driven architecture is optimized for a large number of parallel connections (keep-alive) which is important for high performance AJAX applications.

You can check the Lighty benchmark here.

You may be interested in some of the Lighty extension projects,

Lighty2Go – Portable Lighty webserver configured with MySQL and PHP stack.

yPortableWS – Portable Lighty Webserver with MySQL and PHP stack.

WLMP Project – Windows based Lighty with MySQL database server and PHP support.

Popularity: 3% [?]

Apache Open Source Projects – Part 2

This post is a continuation of the previous post ‘Apache Open Source Projects – Part 1 ‘. In this post we will look into other cool projects of ASF (Apache Software Foundation).

James

james-project-logoApache James is a Enterprise mailing Server which integrates emailing protocols such as SMTP, LMTP (from V3), POP3, IMAP (from V3) and Sieve filtering funtioality. Apache James is 100% pure Java application based on the Java 2 platform and the JavaMail 1.3 API. It works alone without the need for any other server or solution. James Server uses Mailets to process emails. There are Mailets APIs available so that user can write their own mail handling code, such as creating archives, filtering mails, update database.

 

mod_perl

mod perlIt embeds Perl interpreter into Apache HTTP server, so that dynamic content produced by Perl can be provided as response to the incoming requests. mod_perl can emulate a CGI (Common Gateway Interface). It provides complete access to the Apache API, allowing developers to write handlers for all phases of Apache Http server. Everything from virtual hosts to authentication settings can be configured via Perl.

 

Pivot

Apache PivotApache Pivot is an open-source platform for building RIA (Rich Internet Applications) in Java. It combines the enhanced productivity and usability features of a modern RIA toolkit with the robustness of the Java platform. It provides a comprehensive set of foundation classes that together comprise a framework. These classes form the building blocks upon which more complex and sophisticated applications can be built.

(more…)

Popularity: 4% [?]

Apache Open Source Projects – Part 1

The Apache Software Foundation is not only famous for its Open source Web Server, it has more open source projects. In this post we will look into some of its cool projects.

HTTP Server

Apache Web ServerIts a widely used and most popular web server; supports differentoperating systems. Since it is an open source software, hosting your web site in this web server will cost you less. This web server supports several server side programing languages which includes PHP, Perl, Python, .Net and Ruby.

Ant

Apache AntAnt is a tool to build Java applications. Its is similar to the Make, theonly difference between these is Ant uses XML to describe the build process where Make uses make file. Ant supplies a number of built-in tasks allowing to compile, assemble, test and run Java applications.

 

 

Directory

Apache Directory Server LogoThis project provides Directory solutions which includes a LDAPv3 compatible Directory Server and a Directory Studio. The Directory Server supports Kerberos 5 and Change Password Protocol. The Directory Studio contains LDAP tools which can be used with any LDAP servers.

(more…)

Popularity: 12% [?]

Creating Excel as Datasource for Mail Merge using C#

We can use excel as datasource for mail merge.We have to write the header and records in excel file which will act as the datasource for word mail merge.

The first row of excel will be treated as the header in the excel.

while using word as datasource and create a the word datasource we get an error “String longer than 255 characters ” when the concatenated fields string length increases 255. To overcome we can use excel as datasource.

Download Zip

Coding :

//Creating Excel file
private void CreateMailMergeExcelDataFile()
{
try
{
string[] fileds,record1;
 
Object oName = "C:\\TempDoc.xls";
string strHeader = "FirstName, LastName, Address, CityStateZip";
string strRecord1 = "John,Roy,31 New street,320009";
 
MSExcel.Application excelapp;
MSExcel.Workbook excelwrbook;
 
excelapp = new Microsoft.Office.Interop.Excel.Application();
excelapp.Visible = true;
MSExcel.Worksheet ws = new MSExcel.WorksheetClass();
 
excelwrbook = excelapp.Workbooks.Add(objMissing);
 
ws = (MSExcel.Worksheet)excelapp.ActiveWorkbook.ActiveSheet;
 
fileds = strHeader.Split(',');
record1 = strRecord1.Split(',');
//writing in excel you Can use datatable and Get the records and loop.here for
sample i have writing keeping two strings 
 
for (int i = 0; i < j =" 0;" style="color: rgb(0, 102, 0);"  
 //saving the excel workbook
excelwrbook.SaveAs(oName, 
MSExcel.XlFileFormat.xlTemplate, objMissing, 
objMissing, objMissing,objMissing, 
MSExcel.XlSaveAsAccessMode.xlExclusive,
objMissing, objMissing, objMissing, 
objMissing, objMissing);
excelapp.Quit();
 
//opening the excel to act as a datasource for word mail merge
wrdDoc.MailMerge.OpenDataSource("C:\\TempDoc.xls", 
ref objMissing, ref objMissing, ref objMissing, ref objMissing, 
ref objMissing,ref objMissing, ref objMissing, 
ref objMissing,ref objMissing, ref objMissing,
ref objMissing, ref oQuery,ref objMissing, ref objMissing,
ref objMissing);
 
}
catch (Exception ex)
{
MessageBox.Show("Error :" + ex);
}
}
 
private void button1_Click(object sender, System.EventArgs e)
{
try
{
Word.Selection wrdSelection;
Word.MailMerge wrdMailMerge;
Word.MailMergeFields wrdMergeFields;
Word.Table wrdTable;
string StrToAdd;
 
wrdApp = new Word.Application();
wrdApp.Visible = false;
 
// Add a new document.
wrdDoc = wrdApp.Documents.Add(ref objMissing, ref objMissing,
ref objMissing, ref objMissing);
wrdDoc.Select();
 
wrdSelection = wrdApp.Selection;
wrdMailMerge = wrdDoc.MailMerge;
 
// Create a MailMerge Data file using excel 
CreateMailMergeExcelDataFile();
// Create a string and insert it into the document.
StrToAdd = "Mail Merge";
wrdSelection.ParagraphFormat.Alignment =
Word.WdParagraphAlignment.wdAlignParagraphCenter;
wrdSelection.TypeText(StrToAdd);
 
InsertLines(2);
 
// Insert merge data.
wrdSelection.ParagraphFormat.Alignment =
Word.WdParagraphAlignment.wdAlignParagraphLeft;
wrdMergeFields = wrdMailMerge.Fields;
wrdMergeFields.Add(wrdSelection.Range, "FirstName");
wrdSelection.TypeText(" ");
wrdMergeFields.Add(wrdSelection.Range, "LastName");
wrdSelection.TypeParagraph();
 
wrdMergeFields.Add(wrdSelection.Range, "Address");
wrdSelection.TypeParagraph();
wrdMergeFields.Add(wrdSelection.Range, "CityStateZip");
 
InsertLines(2);
 
wrdSelection.ParagraphFormat.Alignment =
Word.WdParagraphAlignment.wdAlignParagraphRight;
 
Object objDate = "dddd, MMMM dd, yyyy";
wrdSelection.InsertDateTime(ref objDate, ref oFalse, ref objMissing,
ref objMissing, ref objMissing);
 
InsertLines(2);
 
wrdSelection.ParagraphFormat.Alignment =
Word.WdParagraphAlignment.wdAlignParagraphJustify;
 
wrdSelection.TypeText("Dear ");
wrdMergeFields.Add(wrdSelection.Range, "FirstName");
wrdSelection.TypeText(",");
InsertLines(1);
 
StrToAdd = "Thank you for using Mail Merge.";
wrdSelection.TypeText(StrToAdd);
// Perform mail merge.
wrdMailMerge.Destination = Word.WdMailMergeDestination.wdSendToNewDocument;
wrdMailMerge.Execute(ref oFalse);
 
// Close the original form document.
wrdDoc.Saved = true;
wrdDoc.Close(ref oFalse, ref objMissing, ref objMissing);
 
 // Makes the merged doc visible
wrdApp.Visible = true;
 
// Release References.
wrdSelection = null;
wrdMailMerge = null;
wrdMergeFields = null;
wrdDoc = null;
wrdApp = null;
 
// Clean up temp file.
System.IO.File.Delete("C:\\TempDoc.xls");
}
catch (Exception ex)
{
MessageBox.Show("Error :" + ex);
}
}

Popularity: 1% [?]

Mail Merge Using C#

I was looking for doing a mail merge application and went through the web and found a good article from Microsoft link .This automates Microsoft Word to perform Mail Merge using C#.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Word = Microsoft.Office.Interop.Word;

namespace mailmersamp1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

Word.Application wrdApp;
Word._Document wrdDoc;
Object oMissing = System.Reflection.Missing.Value;
Object oFalse = false;

private void InsertLines(int LineNum)
{
int iCount;

// Insert “LineNum” blank lines.
for (iCount = 1; iCount <= LineNum; iCount++)
{
wrdApp.Selection.TypeParagraph();
}
}

private void FillRow(Word._Document oDoc, int Row, string Text1, string Text2, string Text3, string Text4)
{
// Insert the data into the specific cell.
oDoc.Tables[1].Cell(Row, 1).Range.InsertAfter(Text1);
oDoc.Tables[1].Cell(Row, 2).Range.InsertAfter(Text2);
oDoc.Tables[1].Cell(Row, 3).Range.InsertAfter(Text3);
oDoc.Tables[1].Cell(Row, 4).Range.InsertAfter(Text4);
}

private void CreateMailMergeDataFile()
{
Word._Document oDataDoc;
int iCount;
Object oName = “C:\TempDoc.doc”;
Object oHeader = “FirstName, LastName, Address, CityStateZip”; wrdDoc.MailMerge.CreateDataSource(ref oName, ref oMissing,ref oMissing, ref oHeader, ref oMissing, ref oMissing,ref oMissing, ref oMissing, ref oMissing);

// Open the file to insert data.
oDataDoc = wrdApp.Documents.Open(ref oName, ref oMissing,ref oMissing, ref oMissing, ref oMissing, ref oMissing,ref oMissing, ref oMissing, ref oMissing, ref oMissing,ref oMissing, ref oMissing, ref oMissing, ref oMissing,ref oMissing, ref oMissing);

for (iCount = 1; iCount <= 1; iCount++)
{
oDataDoc.Tables[1].Rows.Add(ref oMissing);
}
// Fill in the data.

FillRow(oDataDoc, 2, “Roy”, “John”,”45 Main Street”, “Chennai, IND 6399873″);
FillRow(oDataDoc, 3, “Jan”, “Mike”,”34 cross Street”, “Trichy, IND 620006″);

// Save and close the file.
oDataDoc.Save();
oDataDoc.Close(ref oFalse, ref oMissing, ref oMissing);
}

private void button1_Click(object sender, System.EventArgs e)
{
Word.Selection wrdSelection;
Word.MailMerge wrdMailMerge;
Word.MailMergeFields wrdMergeFields;
Word.Table wrdTable;
string StrToAdd;

wrdApp = new Word.Application();
wrdApp.Visible = false;

// Add a new document.
wrdDoc = wrdApp.Documents.Add(ref oMissing, ref oMissing,ref oMissing, ref oMissing);
wrdDoc.Select();

wrdSelection = wrdApp.Selection;
wrdMailMerge = wrdDoc.MailMerge;

// Create a MailMerge Data file.
CreateMailMergeDataFile();

// Create a string and insert it into the document.
StrToAdd = “Mail Merge”;
wrdSelection.ParagraphFormat.Alignment =Word.WdParagraphAlignment.wdAlignParagraphCenter;
wrdSelection.TypeText(StrToAdd);

InsertLines(2);

// Insert merge data.
wrdSelection.ParagraphFormat.Alignment =
Word.WdParagraphAlignment.wdAlignParagraphLeft;
wrdMergeFields = wrdMailMerge.Fields;
wrdMergeFields.Add(wrdSelection.Range, “FirstName”);
wrdSelection.TypeText(” “);
wrdMergeFields.Add(wrdSelection.Range, “LastName”);
wrdSelection.TypeParagraph();

wrdMergeFields.Add(wrdSelection.Range, “Address”);
wrdSelection.TypeParagraph();
wrdMergeFields.Add(wrdSelection.Range, “CityStateZip”);

InsertLines(2);

// Right justify the line and insert a date field
// with the current date.
wrdSelection.ParagraphFormat.Alignment =
Word.WdParagraphAlignment.wdAlignParagraphRight;

Object objDate = “dddd, MMMM dd, yyyy”;
wrdSelection.InsertDateTime(ref objDate, ref oFalse, ref oMissing,
ref oMissing, ref oMissing);

InsertLines(2);

// Justify the rest of the document.
wrdSelection.ParagraphFormat.Alignment =
Word.WdParagraphAlignment.wdAlignParagraphJustify;

wrdSelection.TypeText(“Dear “);
wrdMergeFields.Add(wrdSelection.Range, “FirstName”);
wrdSelection.TypeText(“,”);
InsertLines(1);

// Create a string and insert it into the document.
StrToAdd = “Thank you for using Mail Merge.”;
wrdSelection.TypeText(StrToAdd);

InsertLines(2);

// Insert a new table with 3 rows and 4 columns.
wrdTable = wrdDoc.Tables.Add(wrdSelection.Range, 3, 4,
ref oMissing, ref oMissing);

// Set the column widths.
wrdTable.Columns[1].SetWidth(100, Word.WdRulerStyle.wdAdjustNone);
wrdTable.Columns[2].SetWidth(100, Word.WdRulerStyle.wdAdjustNone);
wrdTable.Columns[1].SetWidth(100, Word.WdRulerStyle.wdAdjustNone);
wrdTable.Columns[2].SetWidth(100, Word.WdRulerStyle.wdAdjustNone);

// Set the shading on the first row to light gray.
wrdTable.Rows[1].Cells.Shading.BackgroundPatternColorIndex =
Word.WdColorIndex.wdGray25;

// Bold the first row.
wrdTable.Rows[1].Range.Bold = 1;

// Center the text in Cell (1,1).
wrdTable.Cell(1, 1).Range.Paragraphs.Alignment =
Word.WdParagraphAlignment.wdAlignParagraphCenter;

// Fill each row of the table with data.
FillRow(wrdDoc, 1, “Number”, “Name”,”Dept”,”Note”);
FillRow(wrdDoc, 2, “100″, “abc”,”Cse”,”New”);
FillRow(wrdDoc, 3, “101″, “def”,”Ece”,”New”);

// Go to the end of the document.
Object oConst1 = Word.WdGoToItem.wdGoToLine;
Object oConst2 = Word.WdGoToDirection.wdGoToLast;
wrdApp.Selection.GoTo(ref oConst1, ref oConst2, ref oMissing, ref oMissing);

// Create a string and insert it into the document.
StrToAdd = “n For additional information regarding the ” +
“Mail Merge, ” + “you can visit our Web Site at “;
wrdSelection.TypeText(StrToAdd);

// Insert a hyperlink to the Web page.
Object oAddress = “http://www.fordevs.com”;
Object oRange = wrdSelection.Range;
wrdSelection.Hyperlinks.Add(oRange, ref oAddress, ref oMissing,
ref oMissing, ref oMissing, ref oMissing);

// Create a string and insert it into the document
StrToAdd = “. Thank you for your interest in Mail Merge. rnrn” +
“Sincerely,rn” + “Jackrn”;
wrdSelection.TypeText(StrToAdd);

// Perform mail merge.
wrdMailMerge.Destination = Word.WdMailMergeDestination.wdSendToNewDocument;
wrdMailMerge.Execut
e(ref oFalse);

// Close the original form document.
wrdDoc.Saved = true;
wrdDoc.Close(ref oFalse, ref oMissing, ref oMissing);

// Makes the merged doc visible
wrdApp.Visible = true;

// Release References.
wrdSelection = null;
wrdMailMerge = null;
wrdMergeFields = null;
wrdDoc = null;
wrdApp = null;

// Clean up temp file.
System.IO.File.Delete(“C:\TempDoc.doc”);
}
}
}

Download Zip

Note :

We get a error when the concatenated fields string length exceeds 255. To Overcome we can use excel as datasource instead of word.

Using Excel as Datasource

Popularity: 39% [?]

Designed by: Business Web Hosting | Thanks to Buy Icons, travel tips and Used Cars