Import HTML file in .NET, Java and other programming languages
EasyXLS™ library allows you to import HTML files. The following actions are performed when the HTML is loaded:
- Import text data from HTML files - Import HTML tables - Import HTML formatting similarly as Excel cell formatting - Import images from HTML file - Import hyperlinks from HTML file
EasyXLS also supports HTML files with specific character encoding.
EasyXLS can be successfully used inclusively to import large HTML files having big volume of data with fast importing time.
// Create an instance of the class that imports HTML files
ExcelDocument workbook = new ExcelDocument();
// Import HTML file
workbook.easy_LoadHTMLFile("C:\\Samples\\file.html");
' Create an instance of the class that imports HTML filesDim workbook As New ExcelDocument
' Import HTML file
workbook.easy_LoadHTMLFile("C:\Samples\file.html")
C++// Create an instance of the class that imports HTML files
EasyXLS::IExcelDocumentPtr workbook;
hr = CoCreateInstance(__uuidof(EasyXLS::ExcelDocument),
NULL,
CLSCTX_ALL,
__uuidof(EasyXLS::IExcelDocument),
(void**) &workbook) ;
// Import HTML file
workbook->easy_LoadHTMLFile_2("C:\\Samples\\file.html");
Click here to see Continuous Code ListingC++.NET// Create an instance of the class that imports HTML files
ExcelDocument ^workbook = gcnew ExcelDocument();
// Import HTML file
workbook->easy_LoadHTMLFile("C:\\Samples\\file.html");
Click here to see Continuous Code Listing
// Create an instance of the class that imports HTML files
ExcelDocument workbook = new ExcelDocument();
// Import HTML file
workbook.easy_LoadHTMLFile("C:\\Samples\\file.html");
.NET:// Create an instance of the class that imports HTML files
$workbook = new COM("EasyXLS.ExcelDocument");
// Import HTML file
$workbook->easy_LoadHTMLFile_2("C:\Samples\file.html");
Click here to see Continuous Code ListingJava:// Create an instance of the class that imports HTML files
$workbook = new java("EasyXLS.ExcelDocument");
// Import HTML file
$workbook->easy_LoadHTMLFile("C:\Samples\file.html");
Click here to see Continuous Code Listing
' Create an instance of the class that imports HTML filesset workbook = Server.CreateObject("EasyXLS.ExcelDocument")
' Import HTML file
workbook.easy_LoadHTMLFile_2("C:\Samples\file.html")
' Create an instance of the class that imports HTML filesSet workbook = CreateObject("EasyXLS.ExcelDocument")
' Import HTML file
workbook.easy_LoadHTMLFile_2("C:\Samples\file.html")
' Create an instance of the class that imports HTML filesset workbook = CreateObject("EasyXLS.ExcelDocument")
' Import HTML file
workbook.easy_LoadHTMLFile_2("C:\Samples\file.html")
<!-- Create an instance of the class that imports HTML files --><cfobject type="java"class="EasyXLS.ExcelDocument"name="workbook"action="CREATE"><!-- Import HTML file --><cfset ret = workbook.easy_LoadHTMLFile("C:\Samples\file.html")>
.NET:# Create an instance of the class used to import/export Excel files
workbook = ExcelDocument()
# Import HTML file
workbook.easy_LoadHTMLFile("C:\\Samples\\file.html")
Click here to see Continuous Code ListingJava:# Create an instance of the class used to import/export Excel files
workbook = gateway.jvm.ExcelDocument()
# Import HTML file
workbook.easy_LoadHTMLFile("C:\\Samples\\file.html")
Click here to see Continuous Code Listing
// Create an instance of the class that imports HTML files
ExcelDocument workbook = new ExcelDocument();
// Import HTML file with specific encoding
System.IO.StreamReader streamReader = new System.IO.StreamReader
("C:\\Samples\\File.html", System.Text.Encoding.Unicode);
workbook.easy_LoadHTMLFile(streamReader);
' Create an instance of the class that imports HTML filesDim workbook As New ExcelDocument
' Import HTML file with specific encodingDim streamReader As System.IO.StreamReader =
New System.IO.StreamReader("C:\\Samples\\File.html", System.Text.Encoding.Unicode)
workbook.easy_LoadHTMLFile(streamReader)
C++// Create an instance of the class that imports HTML files
EasyXLS::IExcelDocumentPtr workbook;
hr = CoCreateInstance(__uuidof(EasyXLS::ExcelDocument),
NULL,
CLSCTX_ALL,
__uuidof(EasyXLS::IExcelDocument),
(void**) &workbook);
// Import HTML file with specific encoding
workbook->easy_LoadHTMLFile_4("C:\\Samples\\File.html", "Unicode");
C++.NET// Create an instance of the class that imports HTML files
ExcelDocument ^workbook = gcnew ExcelDocument();
// Import HTML file with specific encoding
System::IO::StreamReader ^streamReader = gcnew System::IO::StreamReader
("C:\\Samples\\File.html", System::Text::Encoding::Unicode);
workbook->easy_LoadHTMLFile(streamReader);
// Create an instance of the class that imports HTML files
ExcelDocument workbook = new ExcelDocument();
// Import HTML file with specific encoding
java.io.InputStream inputStream = new java.io.FileInputStream("C:\\Samples\\File.html");
java.io.InputStreamReader inputStreamReader = new java.io.InputStreamReader(
inputStream, java.nio.charset.Charset.forName("Unicode"));
workbook.easy_LoadHTMLFile(inputStreamReader);
.NET:// Create an instance of the class that imports HTML files
$workbook = new COM("EasyXLS.ExcelDocument");
// Import HTML file with specific encoding
$workbook->easy_LoadHTMLFile_4("C:\\Samples\\File.html", "Unicode");
Java:// Create an instance of the class that imports HTML files
$workbook = new java("EasyXLS.ExcelDocument");
// Import HTML file with specific encoding
$workbook->easy_LoadHTMLFile("C:\\Samples\\File.html", "Unicode");
' Create an instance of the class that imports HTML filesSet workbook = Server.CreateObject("EasyXLS.ExcelDocument")
' Import HTML file with specific encoding
workbook.easy_LoadHTMLFile_4 "C:\Samples\File.html", "Unicode"
' Create an instance of the class that imports HTML filesSet workbook = CreateObject("EasyXLS.ExcelDocument")
' Import HTML file with specific encoding
workbook.easy_LoadHTMLFile_4 "C:\\Samples\\File.html", "Unicode"
' Create an instance of the class that imports HTML filesSet workbook = CreateObject("EasyXLS.ExcelDocument")
' Import HTML file with specific encoding
workbook.easy_LoadHTMLFile_4 "C:\Samples\File.html", "Unicode"
<!-- Create an instance of the class that imports HTML files --><cfobject type="java"class="EasyXLS.ExcelDocument"name="workbook"action="CREATE"><!-- Import HTML file with specific encoding --><cfset success = workbook.easy_LoadHTMLFile("C:\Samples\File.html", "Unicode")>
.NET:# Create an instance of the class that imports HTML files
workbook = ExcelDocument()
# Import HTML file with specific encoding
streamReader = System.IO.StreamReader("C:\\Samples\\File.html",
System.Text.Encoding.Unicode)
workbook.easy_LoadHTMLFile(streamReader)
Java:# Create an instance of the class that imports HTML files
workbook = gateway.jvm.ExcelDocument()
# Import HTML file with specific encoding
workbook.easy_LoadHTMLFile("C:\\Samples\\File.html", "Unicode")
Getting started with EasyXLS Excel library
To download the trial version of EasyXLS Excel Library, press the below button:
If you already own a license key, you may login and download EasyXLS from your account.