Microsoft Excel - Excel - ActiveXObject

Asked By Eric Sacramento on 22-Feb-12 11:57 AM
Earn up to 50 extra points for answering this tough question.
Hi Guys,

I am trying to insert one picture in footer page, but I dont kwnon where is the mistake.

Anyone can help me ??

Thank you,

Eric

My code


....
function openAndPasteInExcel()
{
  var excel = new ActiveXObject('Excel.Application');
  var workBooks = excel.Workbooks.Add;
  var excelSheet = workBooks.Worksheets(1);
  excelSheet.Application.Visible = true;
  excelSheet.Activate();
  excel.ActiveSheet.Range('A1').Select;
  excel.ActiveSheet.PasteSpecial(0,false,false);
  return excel;

}

 .....


strPicName = "C:\TESTE\LEGENDE_HEBDOMADAIRE_EXCEL.png";
excel.ActiveSheet.PageSetup.LeftFooterPicture.Filename = strPicName;
excel.ActiveSheet.PageSetup.LeftFooter = "&G";
kalpana aparnathi replied to Eric Sacramento on 22-Feb-12 12:47 PM
hi,

Try with this way for inserting image in footer:

Paragraph footerParagraph = footer.AddParagraph();
DocPicture footerPicture = footerParagraph.AppendPicture(Image.FromFile("Footer.png"));

Regards,
Eric Sacramento replied to kalpana aparnathi on 22-Feb-12 12:53 PM
Thank you for your awnser, but it doest work !! :(
kalpana aparnathi replied to Eric Sacramento on 22-Feb-12 01:04 PM
Try with this:
private void InsertImage(Section section)
{
    Paragraph paragraph = section.AddParagraph();
    paragraph.AppendText("The sample demonstrates how to insert a image into a document.");
    paragraph.ApplyStyle(BuiltinStyle.f2);
    
    paragraph = section.AddParagraph();
    paragraph.Format.HorizontalAlignment = Spire.Doc.Documents.HorizontalAlignment.Left;
    paragraph.AppendPicture(Image.Properties.Resources.Word);
  }
Eric Sacramento replied to kalpana aparnathi on 22-Feb-12 01:13 PM
Sorry Kalpana,

I did not metioned correclty !! This is not C# or VB code, these code are in ActiveXObject, and it is not for Microsoft Word!

This code copy one page in HTML and paste on Excel file.

Thank you again

:D
wally eye replied to Eric Sacramento on 22-Feb-12 04:58 PM

Is the code in red VBA?

This seems to be working for me:

Public Sub test()

    ActiveSheet.PageSetup.CenterFooter = "&G"

    With ActiveSheet.PageSetup.CenterFooterPicture
      .Filename = "C:\Users\Pictures\Jr High.jpg"
'      .Brightness = 0.5
'      .ColorType = msoPictureAutomatic
'      .Contrast = 0.5
'      .Height = 269.25
'      .Width = 441
'      .LockAspectRatio = True
    End With

End Sub

Eric Sacramento replied to wally eye on 22-Feb-12 06:08 PM
Hi Wally,

the code is not in VB, nor is it in C# !
Tomorrow when I get my work I will paste all the code!!

Tks
Somesh Yadav replied to Eric Sacramento on 23-Feb-12 12:48 AM
Hi eric,

Ty this,

function ExportToExcel() {
    input_box
=confirm("Export to Microsoft Excel?");
       
if (input_box==true) {

           
var xlApp = new ActiveXObject("Excel.Application");
           
// Silent-mode:
            xlApp
.Visible = true;
            xlApp
.DisplayAlerts = false;
           
var xlBook = xlApp.Workbooks.Add();
            xlBook
.worksheets("Sheet1").activate;
           
var XlSheet = xlBook.activeSheet;
           
XlSheet.Name="Company Report";

           
// Store the sheet header names in an array
           
var rows = tblreport_invoice.getElementsByTagName("tr");
           
var columns = tblreport_invoice.getElementsByTagName("th");
           
var data = tblreport_invoice.getElementsByTagName("td");

           
// Set Excel Column Headers and formatting from array
           
for(i=0;i<columns.length;i++){
               
XlSheet.cells(2).value= "Company Quote";
               
XlSheet.cells(3,i+1).value= columns[i].innerText; //XlSheetHeader[i];
               
XlSheet.cells(3,i+1).font.color="6";
               
XlSheet.cells(3,i+1).font.bold="true";
               
XlSheet.cells(3,i+1).interior.colorindex="37";
               
XlSheet.Range("K4:K200").NumberFormat = "€ #,##0.00";
               
XlSheet.Range("L4:L200").NumberFormat = "€ #,##0.00";
               
XlSheet.Range("O4:O200").NumberFormat = "€ #,##0.00";
               
XlSheet.Range("P4:P200").NumberFormat = "€ #,##0.00";
               
XlSheet.Range("Q4:Q200").NumberFormat = "€ #,##0.00";
               
XlSheet.Range("R4:R200").NumberFormat = "€ #,##0.00";
               
XlSheet.Range("K4:L1000").HorizontalAlignment = -4152;
               
XlSheet.Range("M4:M1000").HorizontalAlignment = -4152;
               
XlSheet.Range("N4:Q1000").HorizontalAlignment = -4152;
               
XlSheet.Range("R4:R1000").HorizontalAlignment = -4152;
               
XlSheet.Range("F4:F1000").NumberFormat = "MM/DD/YYYY";
           
}

           
//run over the dynamic result table and pull out the values and insert into corresponding Excel cells
           
var d = 0;
           
for (r=4;r<rows.length+3;r++) { // start at row 2 as we've added in headers - so also add in another row!
               
for (c=1;c<columns.length+1;c++) {
                   
XlSheet.cells(r,c).value = data[d].innerText;
                    d
= d + 1;
               
}
           
}

           
//autofit the columns
           
XlSheet.columns.autofit;

           
// Make visible:
            xlApp
.visible = true;
            xlApp
.DisplayAlerts = true;
           
CollectGarbage();
           
//xlApp.Quit();
       
}
}

// Insert company logo at top of the page

MyPic = XlSheet.Pictures.Insert("c:\\1.jpg");
           
MyPic.Top = XlSheet.Range("A1").Top;
           
MyPic.Left = XlSheet.Range("A1").Left;
           
MyPic.ShapeRange.Height = XlSheet.Range("A1").RowHeight * 2;

Hope it helps you.
Danasegarane Arunachalam replied to Eric Sacramento on 23-Feb-12 05:44 AM
Hope this helps

     Add reference to  Microsoft Excel 11.0 Library from COM tab and imports Imports Microsoft.Office.Interop



      //Create instance to Excel


    Excel.Application oxL = new Excel.Application();

    //Suppress any popup to continue automation
    oxL.DisplayAlerts = false;

    //Add work book

    Excel.Workbooks wBooks = oxL.Workbooks;
    //get Work Book
    Excel.Workbook book = wBooks.Add;
    //Get the First Sheet

    Excel.Worksheet mysheet = book.Sheets(1);

    //Add some text
    mysheet.Range("A1").Value = "None";

    //Addd footer
    var _with1 = mysheet;

    //Add the Footer
    //Load the image from physical path
    _with1.PageSetup.LeftFooterPicture.Filename = "C:\\logo.png";

    //Align the footer
    //Page Setup
    var _with2 = _with1.PageSetup;

    _with2.PrintTitleRows = "";
    _with2.PrintTitleColumns = "";

    _with2.LeftHeader = "";
    _with2.CenterHeader = "";
    _with2.RightHeader = "";
    _with2.LeftFooter = "&G";
    _with2.CenterFooter = "";
    _with2.RightFooter = "";
    _with2.LeftMargin = oxL.Application.InchesToPoints(0.75);
    _with2.RightMargin = oxL.Application.InchesToPoints(0.75);
    _with2.TopMargin = oxL.Application.InchesToPoints(1);
    _with2.BottomMargin = oxL.Application.InchesToPoints(1);
    _with2.HeaderMargin = oxL.Application.InchesToPoints(0.5);
    _with2.FooterMargin = oxL.Application.InchesToPoints(0.5);
    _with2.PrintHeadings = false;
    _with2.PrintGridlines = false;
    // .PrintComments = oxL.xlPrintNoComments
    _with2.PrintQuality = 600;
    _with2.CenterHorizontally = false;
    _with2.CenterVertically = false;
    //.Orientation = oxL.xlPortrait
    _with2.Draft = false;
    //.PaperSize = oxL.xlPaperA4
    //.FirstPageNumber = oxL.xlAutomatic
    //.Order = oxL.xlDownThenOver
    _with2.BlackAndWhite = false;
    _with2.Zoom = 100;
    //.PrintErrors = oxL.xlPrintErrorsDisplayed





    //Save the sheet
    mysheet.SaveAs("C:\\Footer.xls");

    //Close workbook
    wBooks.Close();

    //Release object
    System.Runtime.InteropServices.Marshal.ReleaseComObject(oxL);
    //Release excel
    oxL = null;
Eric Sacramento replied to Danasegarane Arunachalam on 23-Feb-12 07:49 AM

Hi Danasegarane and Somesh 

Here is my code and it works perfect if I take off the code that I am trying to do (in red)!

I will try to use yours code, but I want to put it in footer not just one time.

Thanks for yours help.



//Constantes excel
var xlUp = -4162;
var xlTop = -4160;
var xlBottom = -4107;
var xlCenterAcrossSelection = 7;
var xlCenter = -4108;
var xlJustify = -4130;
var xlLeft = -4131;
var xlRight = -4152;
var xlContinuous = 1;
var xlLastCell = 11;
var xlMedium = -4138;
var xlEdgeLeft = 7;
var xlEdgeTop = 8;
var xlEdgeBottom = 9;
var xlEdgeRight = 10;
var xlInsideVertical = 11;
var xlInsideHorizontal = 12;
var PREPARE_PAR = "";
var TITRE = "&b&20Rapport hebdomadaire(Confirmé)";
var SERVICE = "&20Direction des travaux publics\nDivision de la conception et de la réalisation des travaux";
var MACRO_DATE = "&20Date de révision: &D";
var MACRO_PAGINATION = "&20Page &P de &N";


function exportExcel(url)
{
  window.open(url);
}

function exportReportInExcel(reportName)
{

  copyReport("excel","excel");
 
  if(reportName == "RPTCONFIRME")
 
    pasteRPTCONFIRMEInExcel();

   
  window.close();
}

function openAndPasteInExcel()
{
  var excel = new ActiveXObject('Excel.Application');
  var workBooks = excel.Workbooks.Add;
  var excelSheet = workBooks.Worksheets(1);
  excelSheet.Application.Visible = true;
  excelSheet.Activate();
  excel.ActiveSheet.Range('A1').Select;
  excel.ActiveSheet.PasteSpecial(0,false,false);
  return excel;
}


function excelPageSetup(excel, headerRange)
{
  excel.ActiveSheet.Cells.EntireRow.AutoFit;
  excel.ActiveSheet.Cells.EntireColumn.AutoFit;

  excel.ActiveSheet.Range('A4').Select;

  excel.ActiveSheet.PageSetup.PrintTitleRows = headerRange;

  //xlPortrait = 1, xlLandscape = 2
  excel.ActiveSheet.PageSetup.Orientation = 2;

  //xlPaperLetter = 1 (8.5x11), xlPaperTabloid = 3 (11x17), xlPaperLegal= 5 (8.5x14)
  try
  {
    excel.ActiveSheet.PageSetup.PaperSize = 3;
  }
  catch (ex)
  {
   
  }

  //xlDownThenOver = 1, xlOverThenDown = 2
  excel.ActiveSheet.PageSetup.Order = 2;

  //Entête
  excel.ActiveSheet.PageSetup.LeftHeader = SERVICE;
  excel.ActiveSheet.PageSetup.CenterHeader = TITRE;

 //Pied de page
strPicName = "C:\Teste\LEGENDE_HEBDOMADAIRE_EXCEL.png";
excel.ActiveSheet.PageSetup.LeftFooterPicture.Filename=strPicName;
excel.ActiveSheet.PageSetup.LeftFooter = "&G";

  excel.ActiveSheet.PageSetup.CenterFooter = MACRO_PAGINATION;
  excel.ActiveSheet.PageSetup.RightFooter = MACRO_DATE;
 
  excel.ActiveSheet.PageSetup.Zoom = false;
  excel.ActiveSheet.PageSetup.FitToPagesWide = 1;
  excel.ActiveSheet.PageSetup.FitToPagesTall = 32767;
}

function copyReport(startElementId, endElementId)
{
  var report = document.body.createTextRange();
  report.moveToElementText(document.getElementById(startElementId));
  var end = document.body.createTextRange();
  end.moveToElementText(document.getElementById(endElementId));
  report.setEndPoint('EndToEnd', end);
  report.execCommand('Copy');
}

function  pasteRPTCONFIRMEInExcel()
{
  var excel = openAndPasteInExcel();

//Suppression des images
//  try
//  {
//    for (var i =  excel.ActiveSheet.Shapes.Count; i > 0; --i)
//    excel.ActiveSheet.Shapes.Item(i).Delete();
//  }
//  catch (ex)
//  {
//    alert(excel.ActiveSheet.Shapes[i]);
//  }

  //Suppression des liens
  try
  {
   for (var j =  excel.ActiveSheet.Hyperlinks.Count;j > 0; --j)
   excel.ActiveSheet.Hyperlinks(j).Delete();
  }
  catch (ex)
  {
 
  }

  // LastRow = excel.Range("A65536").End(xlUp).Row;
 // excel.Cells(LastRow+2,1).Interior.ColorIndex = 6;
 // excel.Cells(LastRow+2,2).Value = "À discuter";
 // excel.Cells(LastRow+4,1).Interior.ColorIndex = 38; 
 // excel.Cells(LastRow+4,2).Value = "Planification intégrer";


  excel.Range("A:N").font.size=10;
  //Mise en page des colones
  excel.range("A1:N1").font.bold=true;
  excel.range("A1:N1").Interior.ColorIndex = 41;
  //Presentation du titre
  excel.Rows("1:1").HorizontalAlignment=xlCenter;
  excel.ActiveWindow.SplitRow = 1; 
  excel.ActiveWindow.FreezePanes = true;
  excelPageSetup(excel, "$1:$1");
  excel.Columns("A:A").ColumnWidth = 11;
  excel.Columns("B:B").ColumnWidth = 16;
  excel.Columns("C:C").ColumnWidth = 30;
  excel.Columns("E:E").ColumnWidth = 11;
  excel.Columns("G:G").ColumnWidth = 16;
  excel.Columns("H:H").ColumnWidth = 18;
  excel.Columns("I:I").ColumnWidth = 17;
  excel.Columns("K:K").ColumnWidth = 45;
  excel.Columns("L:L").ColumnWidth = 22;
  excel.Columns("M:M").ColumnWidth = 21;
  excel.Columns("N:N").ColumnWidth = 12;
  excel.Columns("A:J").VerticalAlignment = xlCenter;
  excel.Columns("L:N").VerticalAlignment = xlCenter;

  excel.Columns("O:Q").Delete;
  excel.Columns("O:O").ColumnWidth = 0.1;


  

 
}

/********************************* runOnLoad *********************************/
function runOnLoad(f)
{
  if (runOnLoad.loaded)
    f();
  else
    runOnLoad.funcs.push(f);
}

runOnLoad.funcs = [];
runOnLoad.loaded = false;
runOnLoad.run = function() {
  if (!runOnLoad.loaded)
  {
    for(var i=0; i < runOnLoad.funcs.length; i++)
    {
    try {runOnLoad.funcs[i]()}
    catch(e) {}
    }
   
    runOnLoad.loaded = true;
    delete runOnLoad.funcs;
    delete runOnLoad.run;
  }
};

if (window.addEventListener)
  window.addEventListener("load", runOnLoad.run, false);
else if (window.attachEvent)
  window.attachEvent("onload", runOnLoad.run);
else
  window.onload = runOnLoad.run;

Danasegarane Arunachalam replied to Eric Sacramento on 23-Feb-12 07:55 AM
What issue you are facing ?
Danasegarane Arunachalam replied to Eric Sacramento on 23-Feb-12 07:59 AM
I did this one and it worked for me


      Dim str As String = "C:\logo.png"
      'Addd footer
      With mysheet

        'Add the Footer
        'Load the image from physical path

        .PageSetup.LeftFooterPicture.Filename = str

        'Align the footer
        'Page Setup
        With .PageSetup

          .PrintTitleRows = ""
          .PrintTitleColumns = ""

          .LeftHeader = ""
          .CenterHeader = ""
          .RightHeader = ""
          .LeftFooter = "&G"
Eric Sacramento replied to Danasegarane Arunachalam on 23-Feb-12 08:32 AM
Hi  Danasegarane,

For this macro that I created it works! VB

Sub Macro1()
    ActiveSheet.PageSetup.LeftFooterPicture.Filename = _
      "C:\TESTE\LEGENDE_HEBDOMADAIRE_EXCEL.png"
      ActiveSheet.PageSetup.LeftFooter = "&G"
        
        
End Sub

My problem is when I transform this code in ActiveXObject.

var excel = new ActiveXObject('Excel.Application');
strPicName = "C:\Teste\LEGENDE_HEBDOMADAIRE_EXCEL.png";
excel.ActiveSheet.PageSetup.LeftFooterPicture.Filename=strPicName;
excel.ActiveSheet.PageSetup.LeftFooter = "&G";

The meaning of this code is for copy one HTML page and Paste in Excel file.

For you information I am using Apex (Oracle Application Express)

I just want to put a legend in each page of my report because if I take this code off it works very nice.

Thank you

Danasegarane Arunachalam replied to Eric Sacramento on 23-Feb-12 08:37 AM
Instead of ActiveX try the below one

   //Create instance to Excel


    Excel.Application oxL = new Excel.Application();

    //Suppress any popup to continue automation
    oxL.DisplayAlerts = false;

    //Add work book

    Excel.Workbooks wBooks = oxL.Workbooks;
    //get Work Book
    Excel.Workbook book = wBooks.Add;
    //Get the First Sheet

    Excel.Worksheet mysheet = book.Sheets(1);
Eric Sacramento replied to Danasegarane Arunachalam on 23-Feb-12 08:50 AM
Is almost the same thing that I created

  var excel = new ActiveXObject('Excel.Application');
  var workBooks = excel.Workbooks.Add;
  var excelSheet = workBooks.Worksheets(1);
  excelSheet.Application.Visible = true;
  excelSheet.Activate();
  excel.ActiveSheet.Range('A1').Select;
  excel.ActiveSheet.PasteSpecial(0,false,false);
  return excel;

Now, I am thinking to put the code in PL/PDF .... :(

thank you again
Danasegarane Arunachalam replied to Eric Sacramento on 23-Feb-12 09:24 AM
I used the below code and it worked.


1.Open the sheet and see the print preview

<html>
<script>
function CreateExcelwithLogo() {
var Excel, Book; // Declare the variables
Excel = new ActiveXObject("Excel.Application"); // Create the Excel application object.
Excel.Visible = false; // Make Excel invisible.
Book = Excel.Workbooks.Add() // Create a new work book.
Book.ActiveSheet.Cells(2,2).Value = document.all.my_textarea1.value;
   //Add the Footer
    //Load the image from physical path
    Book.ActiveSheet.PageSetup.LeftFooterPicture.Filename = "C:\\logo.png"
    Book.ActiveSheet.PageSetup.LeftFooter = "&G"

Book.SaveAs("C:/Footer.xls");
Excel.Quit(); // Close Excel with the Quit method on the Application object.
alert('done');
}

</script>

<body>
<form name="form1">
<input type=button onClick="CreateExcelwithLogo();" value="Send Excel Data"><input type=text name="my_textarea1" size=70 value="Enter some value">
</form>
</body>
</html>


Example File :
Danasegarane Arunachalam replied to Eric Sacramento on 23-Feb-12 09:30 AM

Forgot to attach the sample

And here is the sample



ExcelFooterLogo.zip
Eric Sacramento replied to Danasegarane Arunachalam on 23-Feb-12 10:36 AM
Do you think that the problem is that I am using Office 2003 in IE 7 ??


Can you try this code ??

For this one it opens  an excel file, but withou the footer picture :S


<html>
<script>

function CreateExcelwithLogo()
{
  var excel = new ActiveXObject('Excel.Application');
  var workBooks = excel.Workbooks.Add;
  var excelSheet = workBooks.Worksheets(1);
  excelSheet.Application.Visible = true;
  excelSheet.Activate();
  excel.ActiveSheet.Range('A1').Select;
  excel.ActiveSheet.PasteSpecial(0,false,false);
  return excel;


excel.ActiveSheet.Cells(2,2).Value = document.all.my_textarea1.value;
excel.ActiveSheet.PageSetup.LeftFooterPicture.Filename = "C:\\Teste\LEGENDE_HEBDOMADAIRE_EXCEL.png";
excel.ActiveSheet.PageSetup.LeftFooter = "&G";
excel.SaveAs("C:\Teste\Footer.xls");
excel.Quit();
alert('done');
}

</script>

<body>
<form name="form1">
<input type=button onClick="CreateExcelwithLogo();" value="Send Excel Data">
<input type=text name="my_textarea1" size=70 value="Enter some value">
</form>
</body>
</html>



Tks, 

I cant upload, I think IE 7 not support to do it !! 

Danasegarane Arunachalam replied to Eric Sacramento on 24-Feb-12 12:36 AM
Surely you are doing wrong here

See the code here

var excel = new ActiveXObject('Excel.Application');
  var workBooks = excel.Workbooks.Add;
  var excelSheet = workBooks.Worksheets(1);
  excelSheet.Application.Visible = true;
  excelSheet.Activate();
  excel.ActiveSheet.Range('A1').Select;
  excel.ActiveSheet.PasteSpecial(0,false,false);
  return excel;

Here you are using

return excel;

After this nothing will be executed.

Means this wont be executed

excel.ActiveSheet.Cells(2,2).Value = document.all.my_textarea1.value;
excel.ActiveSheet.PageSetup.LeftFooterPicture.Filename = "C:\\Teste\LEGENDE_HEBDOMADAIRE_EXCEL.png";
excel.ActiveSheet.PageSetup.LeftFooter = "&G";
excel.SaveAs("C:\Teste\Footer.xls");
excel.Quit();
alert('done');


Change your code as follows


<html>
<script>

function CreateExcelwithLogo()
{
  var excel = new ActiveXObject('Excel.Application');
  var workBooks = excel.Workbooks.Add;
  var excelSheet = workBooks.Worksheets(1);
  excelSheet.Application.Visible = true;
  excelSheet.Activate();
  excel.ActiveSheet.Range('A1').Select;
  excel.ActiveSheet.PasteSpecial(0,false,false);
    excel.ActiveSheet.Cells(2,2).Value = document.all.my_textarea1.value;
    excel.ActiveSheet.PageSetup.LeftFooterPicture.Filename = "C:\\Teste\LEGENDE_HEBDOMADAIRE_EXCEL.png";
    excel.ActiveSheet.PageSetup.LeftFooter = "&G";
    excel.SaveAs("C:\Teste\Footer.xls");
    excel.Quit();

       //Return here
     return excel;



alert('done');
}

</script>

<body>
<form name="form1">
<input type=button onClick="CreateExcelwithLogo();" value="Send Excel Data">
<input type=text name="my_textarea1" size=70 value="Enter some value">
</form>
</body>
</html>

Eric Sacramento replied to Danasegarane Arunachalam on 24-Feb-12 08:05 AM
Thanks again !!

I dont kwon whats its happening ....

Is it works in your enviroment ??

I just made another test here, I put alert('done');  after this code

excel.ActiveSheet.PageSetup.LeftFooterPicture.Filename = "C:\\Teste\LEGENDE_HEBDOMADAIRE_EXCEL.png";

and the alert didnt show up to me.

if I put alert in the first lineS, it will show up !! 

Do I have to be local administrator???
Eric Sacramento replied to Danasegarane Arunachalam on 24-Feb-12 08:54 AM
I found !! LOL

<html>
<script>

function CreateExcelwithLogo()
{
 var excel = new ActiveXObject('Excel.Application');
var workBooks = excel.Workbooks.Add;
var excelSheet = workBooks.Worksheets(1);
excelSheet.Application.Visible = true;
excelSheet.Activate();
excel.ActiveSheet.Range('A1').Select;
excel.ActiveSheet.PasteSpecial(0,false,false);
excel.ActiveSheet.Cells(2,2).Value = document.all.my_textarea1.value;
excel.ActiveSheet.PageSetup.LeftFooterPicture.Filename = "C:/Teste/LEGENDE.png";
// STUPID  Slash
excel.ActiveSheet.PageSetup.LeftFooter = "&G";
excel.SaveAs("C:/Teste/Footer.xls");
excel.Quit();

 //Return here
 return excel;

alert('done');
}

</script>

<body>
<form name="form1">
<input type=button onClick="CreateExcelwithLogo();" value="Send Excel Data">
<input type=text name="my_textarea1" size=70 value="Enter some value">
</form>
</body>
</html>