dragonchild has asked for the wisdom of the Perl Monks concerning the following question:
I'm working on creating on-the-fly Excel spreadsheets that are already converted to HTML. Well, I've already got that done. However, I didn't use CGI;, so I'm trying to get with the program. Except, I'm not that good with CGI (or HTML post-2.0, for that matter), so I'm a little confused.
How would I convert the following code snippet to use CGI? (Assume that all relevant variables have been set to the appropriate values. I'm not looking for advice save for how to remove the embedded HTML.)
print $file "<html xmlns:o=\"urn:schemas-microsoft-com:office:offi +ce\"\n"; print $file " xmlns:x=\"urn:schemas-microsoft-com:office:exce +l\"\n"; print $file " xmlns=\"http://www.w3.org/TR/REC-html40\">\n\n" +; print $file "<head>\n\n"; # In here are a few <META> and <LINK> tags I've already converted ... print $file "<style>\n"; print $file "<!--table\n"; print $file "{\n"; print $file " mso-displayed-decimal-separator:\"\.\";\n"; print $file " mso-displayed-thousand-separator:\"\,\";\n"; print $file "}\n"; print $file "\@page\n"; print $file "{\n"; print $file " margin:1.0in .75in 1.0in .75in;\n"; print $file " mso-header-margin:.5in;\n"; print $file " mso-footer-margin:.5in;\n"; print $file "}\n"; print $file "-->\n"; print $file "</style>\n"; print $file "<![if !supportTabStrip]><script language=\"JavaScript +\">\n"; print $file "<!--\n"; print $file " function fnUpdateTabs() {\n"; print $file " if (parent.window.g_iIEVer >= 4) {\n"; print $file " if (parent.document.readyState == \"compl +ete\" &&\n "; print $file " parent.frames['frTabs'].document.read +yState == \"complete\")\n"; print $file " parent.fnSetActiveSheet($sheet_num);\ +n"; print $file " else\n"; print $file " window.setTimeout(\"fnUpdateTabs();\" +, 150);\n" ; print $file " }\n"; print $file " }\n"; print $file "\n"; print $file " if (window.name != \"frSheet\")\n"; print $file " window.location.replace(\"../$source_doc\");\ +n"; print $file " else\n"; print $file " fnUpdateTabs();\n"; print $file "//-->\n"; print $file "</script>\n"; print $file "<![endif]>\n"; print $file "<!--[if gte mso 9]>\n"; print $file "<xml>\n"; print $file " <x:WorksheetOptions>\n"; print $file " <x:FreezePanes/>\n"; print $file " <x:FrozenNoSplit/>\n"; print $file " <x:SplitHorizontal>1</x:SplitHorizontal>\n"; print $file " <x:TopRowBottomPane>1</x:TopRowBottomPane>\n"; print $file " <x:ActivePane>2</x:ActivePane>\n"; print $file " <x:Selected/>\n" if $selected; print $file " <x:DoNotDisplayGridlines/>\n"; print $file " <x:ProtectContents>True</x:ProtectContents>\n"; print $file " <x:ProtectObjects>True</x:ProtectObjects>\n"; print $file " <x:ProtectScenarios>True</x:ProtectScenarios>\n"; print $file " </x:WorksheetOptions>\n"; print $file "</xml>\n"; print $file "<![endif]-->\n"; print $file "</head>\n\n";
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Non-standard options to tags for CGI.pm
by merlyn (Sage) on Jan 10, 2002 at 22:52 UTC | |
by talexb (Chancellor) on Jan 10, 2002 at 23:57 UTC | |
by dragonchild (Archbishop) on Jan 11, 2002 at 00:25 UTC | |
by dmmiller2k (Chaplain) on Jan 11, 2002 at 06:53 UTC | |
by toma (Vicar) on Jan 11, 2002 at 11:43 UTC | |
by dragonchild (Archbishop) on Jan 11, 2002 at 20:24 UTC | |
by dmmiller2k (Chaplain) on Jan 11, 2002 at 23:27 UTC | |
Re: Non-standard options to tags for CGI.pm
by $code or die (Deacon) on Jan 11, 2002 at 21:02 UTC | |
(tye)Re: Non-standard options to tags for CGI.pm
by tye (Sage) on Jan 12, 2002 at 00:34 UTC |
Back to
Seekers of Perl Wisdom