Login | Register | FAQ

Adding HTML code to php file (excel file converted to html)

+ Post a reply

1 post Page 1 of 1

Adding HTML code to php file (excel file converted to html)

by homerhtml » Mon Apr 10, 2017 2:28 pm

Hi everyone! I recently got access to manage a website and i need to add an excel list. I just know very basic stuff and I am very unsure on how to do it... Any tips on how to do it would be very welcome!

I went to Microsoft excel and saved it as html. It saved 5 files and one of the html sheets has this code like this :

Code: Select all
<html xmlns:v="urn:schemas-microsoft-com:vml"





<meta http-equiv=Content-Type content="text/html; charset=windows-1252">

<meta name=ProgId content=Excel.Sheet>

<meta name=Generator content="Microsoft Excel 15">

<link id=Main-File rel=Main-File


<link rel=File-List href=filelist.xml>

<link rel=Stylesheet href=stylesheet.css>






   {margin:.75in .7in .75in .7in;





<![if !supportTabStrip]><script language="JavaScript">


function fnUpdateTabs()


  if (parent.window.g_iIEVer>=4) {

   if (parent.document.readyState=="complete"

    && parent.frames['frTabs'].document.readyState=="complete")






if (window.name!="frSheet")








<body link=blue vlink=purple>

<table border=0 cellpadding=0 cellspacing=0 width=1264 style='border-collapse:


<col width=154 style='mso-width-source:userset;mso-width-alt:5632;width:116pt'>


and the file I need to add this 'code' to is exactly like this :


Code: Select all
<html xmlns="http://www.w3.org/1999/xhtml">


    <title>HAAR :: Hellenic Association for Aerosol Research</title>

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

    <link rel="icon" href="favicon.ico"/>

    <link rel="stylesheet" type="text/css" href="haar.css" />

    <script type="text/javascript" src="haar.js"></script>


   $doc = new DOMDocument;

   $doc->preserveWhiteSpace = false;

   $theBGs = $doc->documentElement->childNodes->length - 1;

   $randomBGnum = rand(0,$theBGs);

   $randomBG = $doc->documentElement->childNodes->item($randomBGnum)->getAttribute("name");

   echo "<style type='text/css'><!-- body { background-image:url(images/" . $randomBG . ".jpg);

background-attachment:fixed; background-position:top right; background-repeat:repeat; } --></style>";
   if ($_GET["howMany"] == "") $howMany = 5; else $howMany = $_GET["howMany"];

   if ($_GET["l"] == "") $lang = "gr"; else $lang = $_GET["l"];




<div id="logo"><img src="images/logo1.png" border="0" alt="HAAR logo"/></div>

<div id="lang"><a href="?l=gr" class="menu">ελ</a> | <a href="?l=en" class="menu">en</a></div>

<div id="menu">   

   <a class="menu" href="index.php?l=<?php echo $lang; ?>"><?php if ($lang == "gr") echo "σχετικά";

else echo "about"; ?></a> |

   <a class="menu" href="news.php?l=<?php echo $lang; ?>"><?php if ($lang == "gr") echo

"νέα/δραστηριότητες"; else echo "news/activities"; ?></a> |    

   <a class="menu" href="links.php?l=<?php echo $lang; ?>"><?php if ($lang == "gr") echo

"σύνδεσμοι"; else echo "links"; ?></a> |

   <a class="menu" href="contact.php?l=<?php echo $lang; ?>"><?php if ($lang == "gr") echo

"επικοινωνία"; else echo "contact"; ?></a> |

   <a class="menu" href="eac.php?l=<?php echo $lang; ?>">_eac_</a> |

   <a class="menuActive" href="#"><?php if ($lang == "gr") echo "Μέλη"; else echo "Members"; ?></a>


<div id="viewer">

   $content = new DOMDocument;

   $content->preserveWhiteSpace = false;



   <div class="title"><?php if ($lang == "gr") echo "Κατάλογος Μελών"; else echo "Members list";

User avatar


  • Posts: 1
  • Joined: Mon Apr 10, 2017 2:25 pm

+ Post a reply

Page 1 of 1