I wrote a small program today to convert ppt files into html files. I am afraid I will forget it later. I will record it here and share it with you.
The source code is as follows:
Using System;Using System. Collections. Generic;Using System. Text;Using System. IO;Using PPT = Microsoft. Office. Interop. PowerPoint;Using System. Reflection;
Namespace WritePptDemo{Class Program{Static void Main (string [] args
Declare an XML string:
String xml = "....";
Declare the XSLT conversion class:
Extends compiledtransform XSLT = new extends compiledtransform ();
Call the XSLT sheet file:
XSLT. Load ("xsltfile1.xslt ");
Convert string to stream type
Textreader TR = new stringreader (XML );
Declare the xpathdocument class
Xpathdocument XPath = new xpathdocument (TR );
Define the stream type of the write string
Textwriter Tw = new
Original: WPF: Two ways to convert an HTML RGB color value to a color object(1) Mode one:Color Color1 = (color) System.Windows.Media.ColorConverter.ConvertFromString ("#E0E0E0");(2) mode two:Color Color2 = Converttocolor ("#E0E0E0"); public static System.Windows.Media.Color Converttocolor (string value) { int r = 0, g = 0, b = 0; if (value. StartsWith ("#")) { int v = convert.t
It will be annoying to convert a Word document to wiki page manually. Some people shoshould have to face this problem and solve this problem.
I Google the Internet and find this useful online tools:Http://toolserver.org /~ Diberri/cgi-bin/html2wiki/index. cgi
Note: You can convert Doc to HTML file with the help of Gmail, or just use the 'Save... 'Menu in the wo
Convert HTML to JS Code script automatically
Function toScript (val)
{
Var value = val. value
Value = value. replace (// gi ,"\\\\"). replace (/"/gi ,"\\\""). replace (/'/gi ,"\\\'")
ValArr = value. split ("\ r \ n ")
Value = ""
For (I = 0; I
{
Value + = (I = 0 )? "Info = ":""
Value + = "\" "+ valArr [I]
Value + = (I! = ValArr. length-1 )? "\" + \ "\ N \" + \ n ":" \ "\ n"
}
Value + =
We know that XML + XSLT can be directly output to browsers that support XML, such as IE 5.0 or later. However, we also need to consider that many Browsers Do not directly support XML. In this case, we need to convert to html output to the browser on the server. I am afraid this temporary transition method will be used for a while. bhd webmaster InformationBhd webmaster InformationUsing Jsp with tablib to id
Convert an HTML table to an ASP + data list (DataList)Author: yuchen
The data we retrieve from the data storage will be used to display the next two courses provided by eVille. Based on the page design considerations, the standard table is not suitable here. Data must be displayed in a custom format to display the course name, course description, and registration Link (Session_ID is transmitted through Que
Before using teleport Pro to crawl the content of several sites, Web files are in a folder, but converted to CHM format will be more convenient.Used a software called Easychm, is developed by the Chinese people. However, the unregistered version will automatically add a page about the registration in the generated file.Today found a winchm called the Soft armor, is also a need to register, or the trial for 15 days. Files generated by unregistered versions will prompt for registration information
Excel.ApplicationThe value of the second parameter in SaveAs:You can replace these XL types on the left directly with the values of the ten-binary . For example: Convert Excel to HTML JS:FileFormat type decimal value specific file type XlAddIn18 Microsoft Excel add-inxlAddIn818 Microsoft Excel 97-2003 add-inXlcsv 6CSVXLCSVMAC22 Macintosh CSVXlCSVMSDOS24 MSDOS CSVXlCSVWindows23 Windows CSVxlCurren
Convert HTML to txt
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
Public
Static
String
Htmtotxt (
String
Input){Input
=
New
RegEx (
@"
(? M)
"
, Regexoptions. multiline
|
Regexoptions. ignorecase). Replace (input,
""
);Input
=
New
RegEx (
@"
(? M)
"
, Regexoptions. multiline
|
Regexoptions. i
Peter BrombergIt is amazing to provide a way to convert an image file to HTML. Read the original article. The source code provided by him is as follows:
Using
System;
Using
System. text;
Using
System. IO;
Using
System. Web;
Using
System. net;
Using
System. drawing;
Namespace
PAB. Web. utils
{ Public Class Image2html { Private Image2html () {} Public Static
Class libraries that convert HTML webpages (text) to images
The above is a demo tool using the HtmlConvertImage (Html2Image) class library.
MSPlus. HtmlConvertImage mHCont = new MSPlus. HtmlConvertImage ();// Set the length of an image. If the length of a webpage exceeds the length of an image, you can separate it into multiple images.MHCont. ConvertImage (mUrl, Int32.Parse (textBox4.Text), mSaveTo, mFile
A small program that used python to process XML Conversion the other day to convert XML and XSL to HTML.
Libxml2 is used. Therefore, libxml2 must be installed first.
#-*-Coding: MBCS -*-#! /Usr/bin/Python
Import libxml2, libxslt
Class compoundxml:Def _ init _ (Self ):Self. _ result = noneSelf. _ XSL = noneSelf. _ xml = noneDef do (self, xml_file_name, pai_file_name ):Self. _ xml = libxml2.parsefile (xml_fil
Word uses the methods provided by Word.Application to easily translate Word documents into other formats, such as HTML, and the following are all the code that is implemented:
Visual C #
Wordtohtml.aspx
inherits= "Aspxwebcs.wordtohtml"%>
WordToHtml.aspx.cs
Using System;
Using System.Collections;
Using System.ComponentModel;
Using System.Data;
Using System.Drawing;
Using System.Web;
Using System.Web.SessionState;
Using System.Web.UI;
Using System.
js|xml| conversion We know that XML+XSLT can be directly output to support XML browser, such as IE more than 5.0, but we also have to consider that there are many browsers do not directly support XML, in this case, we need to convert the server to HTML output to the browser, This interim transitional approach may have to be used for some time.
Using JSP plus the Tablib identity Library, we can do this trans
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.